build: update to latest version of btcutil+btcwallet

This commit is contained in:
Olaoluwa Osuntokun 2022-11-22 11:36:36 +01:00 committed by Oliver Gugger
parent 1d3e51e3d1
commit df47b9ba5f
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
5 changed files with 38 additions and 22 deletions

4
go.mod
View File

@ -5,11 +5,11 @@ require (
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344
github.com/btcsuite/btcd v0.23.4
github.com/btcsuite/btcd/btcec/v2 v2.2.2
github.com/btcsuite/btcd/btcutil v1.1.2
github.com/btcsuite/btcd/btcutil v1.1.3
github.com/btcsuite/btcd/btcutil/psbt v1.1.5
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
github.com/btcsuite/btcwallet v0.16.2-0.20221109224534-84bf4e34c816
github.com/btcsuite/btcwallet v0.16.5
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0
github.com/btcsuite/btcwallet/walletdb v1.4.0

8
go.sum
View File

@ -87,8 +87,8 @@ github.com/btcsuite/btcd/btcec/v2 v2.2.2/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd
github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A=
github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE=
github.com/btcsuite/btcd/btcutil v1.1.1/go.mod h1:nbKlBMNm9FGsdvKvu0essceubPiAcI57pYBNnsLAa34=
github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ=
github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0=
github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ=
github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0=
github.com/btcsuite/btcd/btcutil/psbt v1.1.4/go.mod h1:9AyU6EQVJ9Iw9zPyNT1lcdHd6cnEZdno5wLu5FY74os=
github.com/btcsuite/btcd/btcutil/psbt v1.1.5 h1:x0ZRrYY8j75ThV6xBz86CkYAG82F5bzay4H5D1c8b/U=
github.com/btcsuite/btcd/btcutil/psbt v1.1.5/go.mod h1:kA6FLH/JfUx++j9pYU0pyu+Z8XGBQuuTmuKYUf6q7/U=
@ -98,8 +98,8 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtyd
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
github.com/btcsuite/btcwallet v0.16.2-0.20221109224534-84bf4e34c816 h1:t4wbkXekvTc1eOGDv2h8l6mkLPnqP93hnRHvNtgpiHQ=
github.com/btcsuite/btcwallet v0.16.2-0.20221109224534-84bf4e34c816/go.mod h1:d8AETQyIIWTtC9CnoCMBmDARp9P65oX4IoBdEP3fDK4=
github.com/btcsuite/btcwallet v0.16.5 h1:4DTJ5aYAJomcR0jAb6JP8D0wNSxfz4H7WN/RBtNZY4o=
github.com/btcsuite/btcwallet v0.16.5/go.mod h1:mM19pFB3lGVxOL+kvHhHZAhdSWXKsZGiHvpJVvxL0D8=
github.com/btcsuite/btcwallet/wallet/txauthor v1.2.3/go.mod h1:T2xSiKGpUkSLCh68aF+FMXmKK9mFqNdHl9VaqOr+JjU=
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 h1:etuLgGEojecsDOYTII8rYiGHjGyV5xTqsXi+ZQ715UU=
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2/go.mod h1:Zpk/LOb2sKqwP2lmHjaZT9AdaKsHPSbNLm2Uql5IQ/0=

View File

@ -339,10 +339,10 @@ func testOnchainFundRecovery(net *lntest.NetworkHarness, t *harnessTest) {
restoreCheckBalance(finalBalance, 9, 20, promptChangeAddr)
// We should expect a static fee of 36400 satoshis for spending 9
// inputs (3 P2WPKH, 3 NP2WPKH, 3 P2TR) to two P2WPKH outputs. Carol
// inputs (3 P2WPKH, 3 NP2WPKH, 3 P2TR) to two P2TR outputs. Carol
// should therefore only have one UTXO present (the change output) of
// 9 - 8 - fee BTC.
const fee = 36400
const fee = 37000
restoreCheckBalance(finalBalance-minerAmt-fee, 1, 21, nil)
// Last of all, make sure we can also restore a node from the extended

View File

@ -265,8 +265,14 @@ func psbtSendFromImportedAccount(t *harnessTest, srcNode, destNode,
)
switch accountAddrType {
case walletrpc.AddressType_WITNESS_PUBKEY_HASH:
expTxFee = 141
expChangeScriptType = txscript.WitnessV0PubKeyHashTy
if account != defaultImportedAccount {
expTxFee = 141
expChangeScriptType = txscript.WitnessV0PubKeyHashTy
break
}
expTxFee = 153
expChangeScriptType = txscript.WitnessV1TaprootTy
case walletrpc.AddressType_NESTED_WITNESS_PUBKEY_HASH:
if account != defaultImportedAccount {
@ -275,15 +281,17 @@ func psbtSendFromImportedAccount(t *harnessTest, srcNode, destNode,
break
}
// Spends from the default NP2WKH imported account have the same
// fee rate as the hybrid address type since a NP2WKH input is
// spent and a P2WKH change output is created.
fallthrough
expTxFee = 176
expChangeScriptType = txscript.WitnessV1TaprootTy
case walletrpc.AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH:
expTxFee = 164
expChangeScriptType = txscript.WitnessV0PubKeyHashTy
case walletrpc.AddressType_TAPROOT_PUBKEY:
expTxFee = 143
expChangeScriptType = txscript.WitnessV1TaprootTy
default:
t.Fatalf("unsupported addr type %v", accountAddrType)
}
@ -418,8 +426,14 @@ func fundChanAndCloseFromImportedAccount(t *harnessTest, srcNode, destNode,
)
switch accountAddrType {
case walletrpc.AddressType_WITNESS_PUBKEY_HASH:
expChanTxFee = 153
expChangeScriptType = txscript.WitnessV0PubKeyHashTy
if account != defaultImportedAccount {
expChanTxFee = 153
expChangeScriptType = txscript.WitnessV0PubKeyHashTy
break
}
expChanTxFee = 165
expChangeScriptType = txscript.WitnessV1TaprootTy
case walletrpc.AddressType_NESTED_WITNESS_PUBKEY_HASH:
if account != defaultImportedAccount {
@ -428,15 +442,17 @@ func fundChanAndCloseFromImportedAccount(t *harnessTest, srcNode, destNode,
break
}
// Spends from the default NP2WKH imported account have the same
// fee rate as the hybrid address type since a NP2WKH input is
// spent and a P2WKH change output is created.
fallthrough
expChanTxFee = 188
expChangeScriptType = txscript.WitnessV1TaprootTy
case walletrpc.AddressType_HYBRID_NESTED_WITNESS_PUBKEY_HASH:
expChanTxFee = 176
expChangeScriptType = txscript.WitnessV0PubKeyHashTy
case walletrpc.AddressType_TAPROOT_PUBKEY:
expChanTxFee = 155
expChangeScriptType = txscript.WitnessV1TaprootTy
default:
t.Fatalf("unsupported addr type %v", accountAddrType)
}

View File

@ -2196,9 +2196,9 @@ func testChangeOutputSpendConfirmation(r *rpctest.Harness,
// TODO(wilmer): replace this once SendOutputs easily supports sending
// all funds in one transaction.
txFeeRate := chainfee.SatPerKWeight(2500)
txFee := btcutil.Amount(14380)
const txFee = int64(14500)
output := &wire.TxOut{
Value: int64(aliceBalance - txFee),
Value: int64(aliceBalance) - txFee,
PkScript: bobPkScript,
}
tx := sendCoins(t, r, alice, bob, output, txFeeRate, true, 1)