mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
translate byte32 to common.Hash
This commit is contained in:
parent
f59d013e40
commit
c3a32e9131
2 changed files with 6 additions and 2 deletions
|
|
@ -321,7 +321,11 @@ func bindBasicTypeGo(kind abi.Type) string {
|
|||
}
|
||||
return "*big.Int"
|
||||
case abi.FixedBytesTy:
|
||||
if kind.Size == 32 {
|
||||
return "common.Hash"
|
||||
} else {
|
||||
return fmt.Sprintf("[%d]byte", kind.Size)
|
||||
}
|
||||
case abi.BytesTy:
|
||||
return "[]byte"
|
||||
case abi.FunctionTy:
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ var bindTests = []struct {
|
|||
sim.Commit()
|
||||
}
|
||||
// Test filtering for certain events and ensure they can be found
|
||||
sit, err := eventer.FilterSimpleEvent(nil, []common.Address{common.Address{1}, common.Address{3}}, [][32]byte{{byte(1)}, {byte(2)}, {byte(3)}}, []bool{true})
|
||||
sit, err := eventer.FilterSimpleEvent(nil, []common.Address{common.Address{1}, common.Address{3}}, []common.Hash{{1}, {2}, {3}}, []bool{true})
|
||||
if err != nil {
|
||||
t.Fatalf("failed to filter for simple events: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue