From 6a7bc6aff74ed52a582b161962122320c9ed0d38 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Mon, 26 Mar 2018 23:42:35 +0200 Subject: [PATCH] Stop processing Value in eth transactions, it exceeds used numeric type --- bchain/coins/eth/ethrpc.go | 8 ++------ bchain/coins/eth/ethrpc_test.go | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/bchain/coins/eth/ethrpc.go b/bchain/coins/eth/ethrpc.go index 34af1835..138d42a6 100644 --- a/bchain/coins/eth/ethrpc.go +++ b/bchain/coins/eth/ethrpc.go @@ -247,10 +247,6 @@ func ethTxToTx(tx *rpcTransaction, blocktime int64, confirmations uint32) (*bcha if len(tx.From) > 2 { from = tx.From[2:] } - v, err := ethNumber(tx.Value) - if err != nil { - return nil, err - } b, err := json.Marshal(tx) if err != nil { return nil, err @@ -275,8 +271,8 @@ func ethTxToTx(tx *rpcTransaction, blocktime int64, confirmations uint32) (*bcha }, Vout: []bchain.Vout{ { - N: uint32(n), - Value: float64(v), + N: uint32(n), + // Value - cannot set, it does not fit precisely to float64 ScriptPubKey: bchain.ScriptPubKey{ // Hex Addresses: []string{to}, diff --git a/bchain/coins/eth/ethrpc_test.go b/bchain/coins/eth/ethrpc_test.go index 83fba6ae..b93ff6f1 100644 --- a/bchain/coins/eth/ethrpc_test.go +++ b/bchain/coins/eth/ethrpc_test.go @@ -382,7 +382,6 @@ func TestEthRPC_GetTransaction(t *testing.T) { ScriptPubKey: bchain.ScriptPubKey{ Addresses: []string{"682b7903a11098cf770c7aef4aa02a85b3f3601a"}, }, - Value: 0, }, }, }, @@ -412,7 +411,6 @@ func TestEthRPC_GetTransaction(t *testing.T) { ScriptPubKey: bchain.ScriptPubKey{ Addresses: []string{"555ee11fbddc0e49a9bab358a8941ad95ffdb48f"}, }, - Value: 1.999622e+18, }, }, },