Adapt monacoin to bigint amounts
This commit is contained in:
parent
6bfc7240a9
commit
ab53107f47
@ -6,6 +6,7 @@ import (
|
|||||||
"blockbook/bchain"
|
"blockbook/bchain"
|
||||||
"blockbook/bchain/coins/btc"
|
"blockbook/bchain/coins/btc"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
"math/big"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -173,8 +174,8 @@ func init() {
|
|||||||
},
|
},
|
||||||
Vout: []bchain.Vout{
|
Vout: []bchain.Vout{
|
||||||
{
|
{
|
||||||
Value: 0.21420790,
|
ValueSat: *big.NewInt(21420790),
|
||||||
N: 0,
|
N: 0,
|
||||||
ScriptPubKey: bchain.ScriptPubKey{
|
ScriptPubKey: bchain.ScriptPubKey{
|
||||||
Hex: "76a914fb69fe6dcfe88557dc0ce0ea65bd7cf02f5e4f5b88ac",
|
Hex: "76a914fb69fe6dcfe88557dc0ce0ea65bd7cf02f5e4f5b88ac",
|
||||||
Addresses: []string{
|
Addresses: []string{
|
||||||
@ -184,8 +185,8 @@ func init() {
|
|||||||
Address: addr1,
|
Address: addr1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Value: 14.68857739,
|
ValueSat: *big.NewInt(1468857739),
|
||||||
N: 1,
|
N: 1,
|
||||||
ScriptPubKey: bchain.ScriptPubKey{
|
ScriptPubKey: bchain.ScriptPubKey{
|
||||||
Hex: "76a914628d603ac50d656e3311ff0cd5490b4c5cdd92ea88ac",
|
Hex: "76a914628d603ac50d656e3311ff0cd5490b4c5cdd92ea88ac",
|
||||||
Addresses: []string{
|
Addresses: []string{
|
||||||
|
|||||||
@ -24,6 +24,7 @@ func NewMonacoinRPC(config json.RawMessage, pushHandler func(bchain.Notification
|
|||||||
b.(*btc.BitcoinRPC),
|
b.(*btc.BitcoinRPC),
|
||||||
}
|
}
|
||||||
s.RPCMarshaler = btc.JSONMarshalerV2{}
|
s.RPCMarshaler = btc.JSONMarshalerV2{}
|
||||||
|
s.ChainConfig.SupportsEstimateFee = false
|
||||||
|
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
@ -54,8 +55,3 @@ func (b *MonacoinRPC) Initialize() error {
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// EstimateFee returns fee estimation.
|
|
||||||
func (b *MonacoinRPC) EstimateFee(blocks int) (float64, error) {
|
|
||||||
return b.EstimateSmartFee(blocks, true)
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user