Do not use unkeyed fields.
This commit is contained in:
parent
73d353247c
commit
b7f030192e
1 changed files with 7 additions and 7 deletions
|
@ -220,40 +220,40 @@ func TestDust(t *testing.T) {
|
||||||
{
|
{
|
||||||
// Any value is allowed with a zero relay fee.
|
// Any value is allowed with a zero relay fee.
|
||||||
"zero value with zero relay fee",
|
"zero value with zero relay fee",
|
||||||
wire.TxOut{0, pkScript},
|
wire.TxOut{Value: 0, PkScript: pkScript},
|
||||||
0,
|
0,
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Zero value is dust with any relay fee"
|
// Zero value is dust with any relay fee"
|
||||||
"zero value with very small tx fee",
|
"zero value with very small tx fee",
|
||||||
wire.TxOut{0, pkScript},
|
wire.TxOut{Value: 0, PkScript: pkScript},
|
||||||
1,
|
1,
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"38 byte public key script with value 584",
|
"38 byte public key script with value 584",
|
||||||
wire.TxOut{584, pkScript},
|
wire.TxOut{Value: 584, PkScript: pkScript},
|
||||||
1000,
|
1000,
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"38 byte public key script with value 585",
|
"38 byte public key script with value 585",
|
||||||
wire.TxOut{585, pkScript},
|
wire.TxOut{Value: 585, PkScript: pkScript},
|
||||||
1000,
|
1000,
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Maximum allowed value is never dust.
|
// Maximum allowed value is never dust.
|
||||||
"max satoshi amount is never dust",
|
"max satoshi amount is never dust",
|
||||||
wire.TxOut{btcutil.MaxSatoshi, pkScript},
|
wire.TxOut{Value: btcutil.MaxSatoshi, PkScript: pkScript},
|
||||||
btcutil.MaxSatoshi,
|
btcutil.MaxSatoshi,
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Maximum int64 value causes overflow.
|
// Maximum int64 value causes overflow.
|
||||||
"maximum int64 value",
|
"maximum int64 value",
|
||||||
wire.TxOut{1<<63 - 1, pkScript},
|
wire.TxOut{Value: 1<<63 - 1, PkScript: pkScript},
|
||||||
1<<63 - 1,
|
1<<63 - 1,
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
|
@ -261,7 +261,7 @@ func TestDust(t *testing.T) {
|
||||||
// Unspendable pkScript due to an invalid public key
|
// Unspendable pkScript due to an invalid public key
|
||||||
// script.
|
// script.
|
||||||
"unspendable pkScript",
|
"unspendable pkScript",
|
||||||
wire.TxOut{5000, []byte{0x01}},
|
wire.TxOut{Value: 5000, PkScript: []byte{0x01}},
|
||||||
0, // no relay fee
|
0, // no relay fee
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue