aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-04-02 05:08:00 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-04-02 05:08:00 +0800
commit5d8be9c30d1f2334ecac0ddb92d82a878b35c51c (patch)
treeffa54299fe016b6b765c071cc6188f3f799503ea /rpc
parenteac4d582d7bfe427d4bf5c738e38f1f9861cd30a (diff)
downloadgo-tangerine-5d8be9c30d1f2334ecac0ddb92d82a878b35c51c.tar.gz
go-tangerine-5d8be9c30d1f2334ecac0ddb92d82a878b35c51c.tar.zst
go-tangerine-5d8be9c30d1f2334ecac0ddb92d82a878b35c51c.zip
Fixed decoding for uint64 into bytes
Diffstat (limited to 'rpc')
-rw-r--r--rpc/types.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/rpc/types.go b/rpc/types.go
index 2d0cf53be..75c4ba85f 100644
--- a/rpc/types.go
+++ b/rpc/types.go
@@ -17,6 +17,7 @@
package rpc
import (
+ "encoding/binary"
"encoding/json"
"fmt"
"math/big"
@@ -65,7 +66,9 @@ func newHexData(input interface{}) *hexdata {
case int64:
d.data = big.NewInt(input).Bytes()
case uint64:
- d.data = big.NewInt(int64(input)).Bytes()
+ buff := make([]byte, 8)
+ binary.BigEndian.PutUint64(buff, input)
+ d.data = buff
case int:
d.data = big.NewInt(int64(input)).Bytes()
case uint: