@@ -34,8 +34,8 @@ type Filter struct {
3434	addresses  []common.Address 
3535	topics     [][]common.Hash 
3636
37- 	block       common.Hash  // Block hash if filtering a single block 
38- 	begin , end  int64        // Range interval if filtering multiple blocks 
37+ 	block       * common.Hash  // Block hash if filtering a single block 
38+ 	begin , end  int64          // Range interval if filtering multiple blocks 
3939
4040	matcher  * bloombits.Matcher 
4141}
@@ -78,7 +78,7 @@ func (sys *FilterSystem) NewRangeFilter(begin, end int64, addresses []common.Add
7878func  (sys  * FilterSystem ) NewBlockFilter (block  common.Hash , addresses  []common.Address , topics  [][]common.Hash ) * Filter  {
7979	// Create a generic filter and convert it into a block filter 
8080	filter  :=  newFilter (sys , addresses , topics )
81- 	filter .block  =  block 
81+ 	filter .block  =  & block 
8282	return  filter 
8383}
8484
@@ -96,8 +96,8 @@ func newFilter(sys *FilterSystem, addresses []common.Address, topics [][]common.
9696// first block that contains matches, updating the start of the filter accordingly. 
9797func  (f  * Filter ) Logs (ctx  context.Context ) ([]* types.Log , error ) {
9898	// If we're doing singleton block filtering, execute and return 
99- 	if  f .block  !=  (common. Hash {})  {
100- 		header , err  :=  f .sys .backend .HeaderByHash (ctx , f .block )
99+ 	if  f .block  !=  nil  {
100+ 		header , err  :=  f .sys .backend .HeaderByHash (ctx , * f .block )
101101		if  err  !=  nil  {
102102			return  nil , err 
103103		}
0 commit comments