Stop processing Value in eth transactions, it exceeds used numeric type

This commit is contained in:
Martin Boehm 2018-03-26 23:42:35 +02:00
parent a4b9a21445
commit 6a7bc6aff7
2 changed files with 2 additions and 8 deletions

View File

@ -247,10 +247,6 @@ func ethTxToTx(tx *rpcTransaction, blocktime int64, confirmations uint32) (*bcha
if len(tx.From) > 2 { if len(tx.From) > 2 {
from = tx.From[2:] from = tx.From[2:]
} }
v, err := ethNumber(tx.Value)
if err != nil {
return nil, err
}
b, err := json.Marshal(tx) b, err := json.Marshal(tx)
if err != nil { if err != nil {
return nil, err return nil, err
@ -275,8 +271,8 @@ func ethTxToTx(tx *rpcTransaction, blocktime int64, confirmations uint32) (*bcha
}, },
Vout: []bchain.Vout{ Vout: []bchain.Vout{
{ {
N: uint32(n), N: uint32(n),
Value: float64(v), // Value - cannot set, it does not fit precisely to float64
ScriptPubKey: bchain.ScriptPubKey{ ScriptPubKey: bchain.ScriptPubKey{
// Hex // Hex
Addresses: []string{to}, Addresses: []string{to},

View File

@ -382,7 +382,6 @@ func TestEthRPC_GetTransaction(t *testing.T) {
ScriptPubKey: bchain.ScriptPubKey{ ScriptPubKey: bchain.ScriptPubKey{
Addresses: []string{"682b7903a11098cf770c7aef4aa02a85b3f3601a"}, Addresses: []string{"682b7903a11098cf770c7aef4aa02a85b3f3601a"},
}, },
Value: 0,
}, },
}, },
}, },
@ -412,7 +411,6 @@ func TestEthRPC_GetTransaction(t *testing.T) {
ScriptPubKey: bchain.ScriptPubKey{ ScriptPubKey: bchain.ScriptPubKey{
Addresses: []string{"555ee11fbddc0e49a9bab358a8941ad95ffdb48f"}, Addresses: []string{"555ee11fbddc0e49a9bab358a8941ad95ffdb48f"},
}, },
Value: 1.999622e+18,
}, },
}, },
}, },