Skip to content

Commit ca7f7d7

Browse files
committed
Self review
1 parent 79857f8 commit ca7f7d7

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

statediff/indexer/indexer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ func (sdi *StateDiffIndexer) processReceiptsAndTxs(tx *sqlx.Tx, args processArgs
319319

320320
// Indexing
321321
// extract topic and contract data from the receipt for indexing
322-
topicSet := make([]string, 4)
323322
mappedContracts := make(map[string]bool) // use map to avoid duplicate addresses
324323
logDataSet := make([]*models.LogsModel, len(receipt.Logs))
325324
for idx, l := range receipt.Logs {
325+
topicSet := make([]string, 4)
326326
for ti, topic := range l.Topics {
327327
topicSet[ti] = topic.Hex()
328328
}

statediff/indexer/ipfs/ipld/eth_header_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import (
99
"strconv"
1010
"testing"
1111

12+
"github.com/ethereum/go-ethereum/core/types"
1213
block "github.com/ipfs/go-block-format"
1314
node "github.com/ipfs/go-ipld-format"
1415
"github.com/multiformats/go-multihash"
15-
16-
"github.com/ethereum/go-ethereum/core/types"
1716
)
1817

1918
func TestBlockBodyRlpParsing(t *testing.T) {

statediff/indexer/ipfs/ipld/eth_log_trie.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type EthLogTrie struct {
1919
OUTPUT
2020
*/
2121

22-
// DecodeEthLogTrie returns an EthRctTrie object from its cid and rawdata.
22+
// DecodeEthLogTrie returns an EthLogTrie object from its cid and rawdata.
2323
func DecodeEthLogTrie(c cid.Cid, b []byte) (*EthLogTrie, error) {
2424
tn, err := decodeTrieNode(c, b, decodeEthLogTrieLeaf)
2525
if err != nil {
@@ -28,7 +28,7 @@ func DecodeEthLogTrie(c cid.Cid, b []byte) (*EthLogTrie, error) {
2828
return &EthLogTrie{TrieNode: tn}, nil
2929
}
3030

31-
// decodeEthLogTrieLeaf parses a eth-rct-trie leaf
31+
// decodeEthLogTrieLeaf parses a eth-log-trie leaf
3232
// from decoded RLP elements
3333
func decodeEthLogTrieLeaf(i []interface{}) ([]interface{}, error) {
3434
l := new(types.Log)
@@ -76,12 +76,12 @@ func (t *EthLogTrie) Loggable() map[string]interface{} {
7676
}
7777
}
7878

79-
// rctTrie wraps a localTrie for use on the receipt trie.
79+
// logTrie wraps a localTrie for use on the receipt trie.
8080
type logTrie struct {
8181
*localTrie
8282
}
8383

84-
// newRctTrie initializes and returns a rctTrie.
84+
// newLogTrie initializes and returns a logTrie.
8585
func newLogTrie() *logTrie {
8686
return &logTrie{
8787
localTrie: newLocalTrie(),

0 commit comments

Comments
 (0)