File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ impl CollectByTransaction for Erc20Transfers {
101101fn is_erc20_transfer ( log : & Log ) -> bool {
102102 log. topics ( ) . len ( ) == 3 &&
103103 log. data ( ) . data . len ( ) == 32 &&
104- log. topics ( ) [ 0 ] == ERC20 :: Approval :: SIGNATURE_HASH
104+ log. topics ( ) [ 0 ] == ERC20 :: Transfer :: SIGNATURE_HASH
105105}
106106
107107/// process block into columns
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ impl NumberChunk {
7474
7575 /// align boundaries of chunk to clean boundaries
7676 pub fn align ( self , chunk_size : u64 ) -> Option < NumberChunk > {
77+ if chunk_size == 0 {
78+ // Cannot align with a chunk_size of 0, return None or self based on desired behavior.
79+ // Returning None seems appropriate as alignment isn't possible.
80+ return None ;
81+ }
7782 match self {
7883 NumberChunk :: Numbers ( numbers) => Some ( NumberChunk :: Numbers ( numbers) ) ,
7984 NumberChunk :: Range ( start, end) => {
You can’t perform that action at this time.
0 commit comments