Skip to content

Commit

Permalink
refactor: modify argument type of libplanetVerifyProof
Browse files Browse the repository at this point in the history
  • Loading branch information
sircoon4 committed Jul 25, 2024
1 parent 46f5a36 commit 5397747
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 36 deletions.
4 changes: 2 additions & 2 deletions core/vm/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ func (c *libplanetVerifyProof) RequiredGas(input []byte) uint64 {
func (c *libplanetVerifyProof) Run(input []byte) ([]byte, error) {
proofMap := map[string]any{
"stateRootHash": nil, // sha256(bencoded) []byte
"proof": nil, // bencoded list [][]byte
"proof": nil, // bencoded(list) []byte
"key": nil, // keyBytes []byte
"value": nil, // bencoded []byte
}
Expand All @@ -1215,7 +1215,7 @@ func (c *libplanetVerifyProof) Run(input []byte) ([]byte, error) {
}

stateRootHash := proofMap["stateRootHash"].([]byte)
proof := proofMap["proof"].([][]byte)
proof := proofMap["proof"].([]byte)
key := proofMap["key"].([]byte)
value := proofMap["value"].([]byte)

Expand Down
Loading

0 comments on commit 5397747

Please sign in to comment.