mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 22:44:24 +00:00
(╯°□°)╯︵ ┻━┻
This commit is contained in:
@@ -288,7 +288,7 @@ func simpleContract() ([]byte, []byte, []byte) {
|
||||
// the is the code we need to return the contractCode when the contract is initialized
|
||||
lenCode := len(contractCode)
|
||||
// push code to the stack
|
||||
//code := append([]byte{byte(0x60 + lenCode - 1)}, LeftPadWord256(contractCode).Bytes()...)
|
||||
//code := append([]byte{byte(0x60 + lenCode - 1)}, RightPadWord256(contractCode).Bytes()...)
|
||||
code := append([]byte{0x7f}, RightPadWord256(contractCode).Bytes()...)
|
||||
// store it in memory
|
||||
code = append(code, []byte{0x60, 0x0, 0x52}...)
|
||||
|
||||
@@ -119,8 +119,8 @@ func testGetStorage(t *testing.T, typ string) {
|
||||
mempoolCount = 0
|
||||
|
||||
v := getStorage(t, typ, contractAddr, []byte{0x1})
|
||||
got := RightPadWord256(v)
|
||||
expected := RightPadWord256([]byte{0x5})
|
||||
got := LeftPadWord256(v)
|
||||
expected := LeftPadWord256([]byte{0x5})
|
||||
if got.Compare(expected) != 0 {
|
||||
t.Fatalf("Wrong storage value. Got %x, expected %x", got.Bytes(), expected.Bytes())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user