Skip to content

Commit

Permalink
Updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Nov 6, 2020
1 parent b17edb0 commit 9681666
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,12 @@ func TestCalculateFeeForTxVariousTxs(t *testing.T) {
"8785ca5f11795a38eb1f50f62562cb5e0335b283762fe8a2c7e96d5f7f79bb15",
220,
},
{"01000000014179d984eb4738acddf290d1cbcb6ec0b44d945dc00020a9337738a4b5d4d0c5020000006b483045022100acc8301fb2f9bf70089e03f2a28ff8a384c0525e94a8ee5bb1ccb9b1f044bb91022012b5fb696bb92b2208f901e8bd43264a161cf97f72024cc1809224eee5fd7bab412102ad7b9a78da643560d0ffa411d27070d2468eccfcbb5b39ec30d69724a181944cffffffff045d020000000000001976a91409cc4559bdcb84cb35c107743f0dbb10d66679cc88ac9e170000000000001976a9141531448d45a7985230d2ad467acc22f635f0d10988ac985b8800000000001976a914cf500ad6b6852a13017d60080e58522716e33b9088ac0000000000000000ac006a223150755161374b36324d694b43747373534c4b79316b683536575755374d74555235035345540361707008746f6e6963706f7704747970650b6f666665725f636c69636b0f6f666665725f636f6e6669675f6964023239106f666665725f73657373696f6e5f6964403361303930636439393361346564386239626261303438643030653134666466303931633266616134333735396236366434363136396634613066313463343900000000",
nil,
nil,
"32050b05bf48440bbb3e7c4fa79aa6cb36a69e2921965780334ee168de41f676",
220,
},
{"010000000190c5208bed05b4e54746bab5a5d4a5e4324e2999c180b7ea7105047f1f16b84a030000006a47304402202ca5d7a2cfb2388babb549b10c47ed20cdadafb845af835c7d5ff04e933ba1c102200a8b7289bbd3c0cc62172afe0006ba374ddd0132a7e4fb4e92ebcff5ce9217db412102812d641ff356c362815f8fc03bd061c2ae57e02f5dc3083f61785c0e5b198039ffffffff040000000000000000ad006a223150755161374b36324d694b43747373534c4b79316b683536575755374d74555235035345540361707008746f6e6963706f7704747970650b6f666665725f636c69636b0f6f666665725f636f6e6669675f696403323934106f666665725f73657373696f6e5f696440653638616631393439626131633239326131376431393635343638383234383663653635313830663465363439383235613561363532376634646132303761661f0c0000000000001976a91409cc4559bdcb84cb35c107743f0dbb10d66679cc88ac31790000000000001976a9147c8ced9ee0f48192822a0148f27b5a1f24aa42d388ac53f74600000000001976a914852f89e9b05d6adfc905842ee0d301947d675df988ac00000000",
&FeeAmount{Bytes: DefaultRateBytes, Satoshis: 1000},
&FeeAmount{Bytes: DefaultRateBytes, Satoshis: 1000},
Expand Down Expand Up @@ -563,6 +569,8 @@ func TestCalculateFeeForTxVariousTxs(t *testing.T) {
t.Errorf("%s Failed: [%s] [%v] [%v] inputted [%d] expected but got: %d", t.Name(), test.inputHex, test.inputStandardRate, test.inputDataRate, test.expectedSatoshis, satoshis)
} else if tx.GetTxID() != test.expectedTxID {
t.Errorf("%s Failed: [%s] [%v] [%v] inputted [%s] expected but got: %s", t.Name(), test.inputHex, test.inputStandardRate, test.inputDataRate, test.expectedTxID, tx.GetTxID())
} else if satoshis != test.expectedSatoshis {
t.Errorf("%s Failed: [%s] [%v] [%v] inputted [%d] expected but got: %d", t.Name(), test.inputHex, test.inputStandardRate, test.inputDataRate, test.expectedSatoshis, satoshis)
}
}
}
Expand Down

0 comments on commit 9681666

Please sign in to comment.