Stop processing Value in eth transactions, it exceeds used numeric type
This commit is contained in:
parent
a4b9a21445
commit
6a7bc6aff7
@ -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},
|
||||||
|
|||||||
@ -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,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user