Fix zcoin parser test

This commit is contained in:
Martin Boehm 2019-02-27 14:06:09 +01:00
parent 881dab35f5
commit 66854715cf
2 changed files with 14 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -15,6 +15,7 @@ import (
"blockbook/bchain" "blockbook/bchain"
"blockbook/bchain/coins/btc" "blockbook/bchain/coins/btc"
"github.com/martinboehm/btcutil/chaincfg" "github.com/martinboehm/btcutil/chaincfg"
) )
@ -58,6 +59,7 @@ func init() {
testTxPacked1 = testTxPackeds[0] testTxPacked1 = testTxPackeds[0]
testTxPacked2 = testTxPackeds[1] testTxPacked2 = testTxPackeds[1]
testTxPacked3 = testTxPackeds[2] testTxPacked3 = testTxPackeds[2]
testTxPacked4 = testTxPackeds[3]
testTx1 = bchain.Tx{ testTx1 = bchain.Tx{
Hex: rawTestTx1, Hex: rawTestTx1,
@ -458,7 +460,7 @@ func TestPackTx(t *testing.T) {
parser: NewZcoinParser(GetChainParams("main"), &btc.Configuration{}), parser: NewZcoinParser(GetChainParams("main"), &btc.Configuration{}),
}, },
want: testTxPacked4, want: testTxPacked4,
wantErr: true, wantErr: false,
}, },
} }
for _, tt := range tests { for _, tt := range tests {
@ -521,16 +523,16 @@ func TestUnpackTx(t *testing.T) {
want1: 126202, want1: 126202,
wantErr: false, wantErr: false,
}, },
// { {
// name: "xzc-4", name: "xzc-coinbase",
// args: args{ args: args{
// packedTx: testTxPacked4, packedTx: testTxPacked4,
// parser: NewZcoinParser(GetChainParams("main"), &btc.Configuration{}), parser: NewZcoinParser(GetChainParams("main"), &btc.Configuration{}),
// }, },
// want: &testTx4, want: &testTx4,
// want1: 100001, want1: 100001,
// wantErr: false, wantErr: false,
// }, },
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {