peer test: remove var casting

This commit is contained in:
Johan T. Halseth 2018-02-21 14:02:28 +01:00
parent f42c16b612
commit 24d30e6495
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26
1 changed files with 4 additions and 4 deletions

View File

@ -139,7 +139,7 @@ func TestPeerChannelClosureAcceptFeeInitiator(t *testing.T) {
CloseType: htlcswitch.CloseRegular, CloseType: htlcswitch.CloseRegular,
ChanPoint: initiatorChan.ChannelPoint(), ChanPoint: initiatorChan.ChannelPoint(),
Updates: updateChan, Updates: updateChan,
TargetFeePerKw: 12000, TargetFeePerKw: 12500,
Err: errChan, Err: errChan,
} }
initiator.localCloseChanReqs <- closeCommand initiator.localCloseChanReqs <- closeCommand
@ -175,7 +175,7 @@ func TestPeerChannelClosureAcceptFeeInitiator(t *testing.T) {
t.Fatalf("unable to query fee estimator: %v", err) t.Fatalf("unable to query fee estimator: %v", err)
} }
feePerKw := feeRate.FeePerKWeight() feePerKw := feeRate.FeePerKWeight()
fee := btcutil.Amount(responderChan.CalcFee(feePerKw)) fee := responderChan.CalcFee(feePerKw)
closeSig, _, _, err := responderChan.CreateCloseProposal(fee, closeSig, _, _, err := responderChan.CreateCloseProposal(fee,
dummyDeliveryScript, initiatorDeliveryScript) dummyDeliveryScript, initiatorDeliveryScript)
if err != nil { if err != nil {
@ -429,7 +429,7 @@ func TestPeerChannelClosureFeeNegotiationsInitiator(t *testing.T) {
CloseType: htlcswitch.CloseRegular, CloseType: htlcswitch.CloseRegular,
ChanPoint: initiatorChan.ChannelPoint(), ChanPoint: initiatorChan.ChannelPoint(),
Updates: updateChan, Updates: updateChan,
TargetFeePerKw: 12000, TargetFeePerKw: 12500,
Err: errChan, Err: errChan,
} }
@ -500,7 +500,7 @@ func TestPeerChannelClosureFeeNegotiationsInitiator(t *testing.T) {
if !ok { if !ok {
t.Fatalf("expected ClosingSigned message, got %T", msg) t.Fatalf("expected ClosingSigned message, got %T", msg)
} }
if uint64(closingSignedMsg.FeeSatoshis) != initiatorIdealFee { if closingSignedMsg.FeeSatoshis != initiatorIdealFee {
t.Fatalf("expected ClosingSigned fee to be %v, instead got %v", t.Fatalf("expected ClosingSigned fee to be %v, instead got %v",
initiatorIdealFee, closingSignedMsg.FeeSatoshis) initiatorIdealFee, closingSignedMsg.FeeSatoshis)
} }