Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
miha-stopar committed Sep 25, 2023
1 parent 063ce78 commit e50e2e4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mpt-witness-generator/trie/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (t *Trie) Prove(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) (
if neighbourNode != nil {
neighbourHash, _ := hasher.ProofHash(neighbourNode)
neighbourNodeRLP, _ = rlp.EncodeToBytes(neighbourHash)
}
}

return neighbourNodeRLP, extNibbles, isLastLeaf, isNeighbourNodeHashed, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2289,4 +2289,4 @@ func TestTrieDoesNotExist(t *testing.T) {
trieModifications := []TrieModification{trieMod1}

prepareWitness("StorageTrieDoesNotExist", trieModifications, statedb)
}
}
2 changes: 1 addition & 1 deletion mpt-witness-generator/witness/leaf.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func prepareStorageLeafInfo(row []byte, valueIsZero, isPlaceholder bool) ([]byte
valueRlp = []byte{0}
// keyRlp holds the RLP of the whole leaf:
// - always 192 because when there is a placeholder, the value occupies only 1 byte (can't be 248)
// - (keyLen + 1) is the number of key bytes
// - (keyLen + 1) is the number of key bytes
// - 1 is the number of value bytes
keyRlp[0] = 192 + keyLen + 2
}
Expand Down
4 changes: 2 additions & 2 deletions mpt-witness-generator/witness/prepare_witness.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func obtainTwoProofsAndConvertToWitness(trieModifications []TrieModification, st
// is not available yet there (GetProof / GetStorageProof fetch the preimages).
if aIsNeighbourNodeHashed {
// The error is not handled here, because it is ok to continue when the preimage is not found
// for the cases when neighbour node is not needed.
// for the cases when neighbour node is not needed.
aNode, _ = oracle.Preimage(common.BytesToHash(aNode[1:]))
}

Expand All @@ -269,7 +269,7 @@ func obtainTwoProofsAndConvertToWitness(trieModifications []TrieModification, st

if isNeighbourNodeHashed {
// The error is not handled here, because it is ok to continue when the preimage is not found
// for the cases when neighbour node is not needed.
// for the cases when neighbour node is not needed.
node, _ = oracle.Preimage(common.BytesToHash(node[1:]))
}

Expand Down

0 comments on commit e50e2e4

Please sign in to comment.