diff --git a/client/asset/dcr/dcr.go b/client/asset/dcr/dcr.go index 9e0cda9050..0a74abe77a 100644 --- a/client/asset/dcr/dcr.go +++ b/client/asset/dcr/dcr.go @@ -3198,11 +3198,11 @@ func (dcr *ExchangeWallet) EstimateRegistrationTxFee(feeRate uint64) uint64 { // Output 2 is change, if any. // // The bond output's redeem script, which is needed to spend the bond output, is -// returned as the BondData field of the Bond. The bond output pays to a -// pubkeyhash script for a wallet address. Bond.RedeemTx is a backup transaction -// that spends the bond output after lockTime passes, paying to an address for -// the current underlying wallet; the bond private key (BondPrivKey) should -// normally be used to author a new transaction paying to a new address instead. +// returned as the Data field of the Bond. The bond output pays to a pubkeyhash +// script for a wallet address. Bond.RedeemTx is a backup transaction that +// spends the bond output after lockTime passes, paying to an address for the +// current underlying wallet; the bond private key (BondPrivKey) should normally +// be used to author a new transaction paying to a new address instead. func (dcr *ExchangeWallet) MakeBondTx(ver uint16, amt uint64, lockTime time.Time, bondKey *secp256k1.PrivateKey, acctID []byte) (*asset.Bond, error) { if ver != 0 { @@ -3316,7 +3316,7 @@ func (dcr *ExchangeWallet) MakeBondTx(ver uint16, amt uint64, lockTime time.Time AssetID: BipID, Amount: amt, CoinID: toCoinID(&txid, 0), - BondData: bondScript, + Data: bondScript, BondPrivKey: bondKey.Serialize(), SignedTx: signedTxBytes, UnsignedTx: unsignedTxBytes, diff --git a/client/asset/dcr/simnet_test.go b/client/asset/dcr/simnet_test.go index de3d73bf89..19fe59eb64 100644 --- a/client/asset/dcr/simnet_test.go +++ b/client/asset/dcr/simnet_test.go @@ -189,7 +189,7 @@ func TestMakeBondTx(t *testing.T) { t.Logf("bond txid %v\n", coinhash) t.Logf("signed tx: %x\n", bond.SignedTx) t.Logf("unsigned tx: %x\n", bond.UnsignedTx) - t.Logf("bond script: %x\n", bond.BondData) + t.Logf("bond script: %x\n", bond.Data) t.Logf("redeem tx: %x\n", bond.RedeemTx) bondMsgTx, err := msgTxFromBytes(bond.SignedTx) if err != nil { @@ -199,7 +199,7 @@ func TestMakeBondTx(t *testing.T) { pkh := dcrutil.Hash160(pubkey.SerializeCompressed()) - lockTimeUint, pkhPush, err := dexdcr.ExtractBondDetailsV0(bondOutVersion, bond.BondData) + lockTimeUint, pkhPush, err := dexdcr.ExtractBondDetailsV0(bondOutVersion, bond.Data) if err != nil { t.Fatalf("ExtractBondDetailsV0: %v", err) } @@ -238,7 +238,7 @@ func TestMakeBondTx(t *testing.T) { waitNetwork() // wait for beta to see the new block (bond must be mined for RefundBond) refundTxNew, err := wallet.RefundBond(context.Background(), bondVer, bond.CoinID, - bond.BondData, bond.Amount, priv) + bond.Data, bond.Amount, priv) if err != nil { t.Fatalf("RefundBond: %v", err) } diff --git a/client/asset/interface.go b/client/asset/interface.go index 4525adf17d..d3fde1c741 100644 --- a/client/asset/interface.go +++ b/client/asset/interface.go @@ -699,7 +699,7 @@ type Bond struct { AssetID uint32 Amount uint64 CoinID []byte - BondData []byte // additional data to interpret the bond e.g. redeem script, bond contract, etc. + Data []byte // additional data to interpret the bond e.g. redeem script, bond contract, etc. BondPrivKey []byte // caller provided, but kept with the output // SignedTx and UnsignedTx are the opaque (raw bytes) signed and unsigned // bond creation transactions, in whatever encoding and funding scheme for