make subscription config rlp encodable, group subs of the

same type using a hash of their config, process only once for each sub
type instead of for every sub.
This commit is contained in:
Ian Norden
2019-12-02 13:24:58 -06:00
parent 1d4d0cbc15
commit 23a21c14f3
13 changed files with 188 additions and 105 deletions
+8 -6
View File
@@ -16,21 +16,23 @@
package config
import "math/big"
// Subscription config is used by a subscribing transformer to specifiy which data to receive from the seed node
type Subscription struct {
BackFill bool
BackFillOnly bool
StartingBlock int64
EndingBlock int64 // set to 0 or a negative value to have no ending block
StartingBlock *big.Int
EndingBlock *big.Int // set to 0 or a negative value to have no ending block
HeaderFilter HeaderFilter
TrxFilter TrxFilter
TrxFilter TrxFilter
ReceiptFilter ReceiptFilter
StateFilter StateFilter
StateFilter StateFilter
StorageFilter StorageFilter
}
type HeaderFilter struct {
Off bool
Off bool
FinalOnly bool
}
@@ -56,4 +58,4 @@ type StorageFilter struct {
Addresses []string
StorageKeys []string
IntermediateNodes bool
}
}