Self review

This commit is contained in:
Arijit Das 2021-08-26 22:42:46 +05:30
parent 79857f81f7
commit ca7f7d7f88
3 changed files with 6 additions and 7 deletions

View File

@ -319,10 +319,10 @@ func (sdi *StateDiffIndexer) processReceiptsAndTxs(tx *sqlx.Tx, args processArgs
// Indexing
// extract topic and contract data from the receipt for indexing
topicSet := make([]string, 4)
mappedContracts := make(map[string]bool) // use map to avoid duplicate addresses
logDataSet := make([]*models.LogsModel, len(receipt.Logs))
for idx, l := range receipt.Logs {
topicSet := make([]string, 4)
for ti, topic := range l.Topics {
topicSet[ti] = topic.Hex()
}

View File

@ -9,11 +9,10 @@ import (
"strconv"
"testing"
"github.com/ethereum/go-ethereum/core/types"
block "github.com/ipfs/go-block-format"
node "github.com/ipfs/go-ipld-format"
"github.com/multiformats/go-multihash"
"github.com/ethereum/go-ethereum/core/types"
)
func TestBlockBodyRlpParsing(t *testing.T) {

View File

@ -19,7 +19,7 @@ type EthLogTrie struct {
OUTPUT
*/
// DecodeEthLogTrie returns an EthRctTrie object from its cid and rawdata.
// DecodeEthLogTrie returns an EthLogTrie object from its cid and rawdata.
func DecodeEthLogTrie(c cid.Cid, b []byte) (*EthLogTrie, error) {
tn, err := decodeTrieNode(c, b, decodeEthLogTrieLeaf)
if err != nil {
@ -28,7 +28,7 @@ func DecodeEthLogTrie(c cid.Cid, b []byte) (*EthLogTrie, error) {
return &EthLogTrie{TrieNode: tn}, nil
}
// decodeEthLogTrieLeaf parses a eth-rct-trie leaf
// decodeEthLogTrieLeaf parses a eth-log-trie leaf
// from decoded RLP elements
func decodeEthLogTrieLeaf(i []interface{}) ([]interface{}, error) {
l := new(types.Log)
@ -76,12 +76,12 @@ func (t *EthLogTrie) Loggable() map[string]interface{} {
}
}
// rctTrie wraps a localTrie for use on the receipt trie.
// logTrie wraps a localTrie for use on the receipt trie.
type logTrie struct {
*localTrie
}
// newRctTrie initializes and returns a rctTrie.
// newLogTrie initializes and returns a logTrie.
func newLogTrie() *logTrie {
return &logTrie{
localTrie: newLocalTrie(),