multi: use txid instead of tx in BreachRetribution
This commit replaces the field `BreachTransaction` with `BreachTxHash` as there's no need to pass that large raw transaction.
This commit is contained in:
7 files changed
+23
-23
No files matched your search
@@ -1243,7 +1243,7 @@ func newRetributionInfo(chanPoint *wire.OutPoint,
|
||||
}
|
||||
|
||||
return &retributionInfo{
|
||||
commitHash: breachInfo.BreachTransaction.TxHash(),
|
||||
commitHash: breachInfo.BreachTxHash,
|
||||
chainHash: breachInfo.ChainHash,
|
||||
chanPoint: *chanPoint,
|
||||
breachedOutputs: breachedOutputs,
|
||||
|
||||
@@ -1051,7 +1051,7 @@ func TestBreachHandoffSuccess(t *testing.T) {
|
||||
processACK <- brarErr
|
||||
},
|
||||
BreachRetribution: &lnwallet.BreachRetribution{
|
||||
BreachTransaction: bobClose.CloseTx,
|
||||
BreachTxHash: bobClose.CloseTx.TxHash(),
|
||||
LocalOutputSignDesc: &input.SignDescriptor{
|
||||
Output: &wire.TxOut{
|
||||
PkScript: breachKeys[0],
|
||||
@@ -1085,7 +1085,7 @@ func TestBreachHandoffSuccess(t *testing.T) {
|
||||
processACK <- brarErr
|
||||
},
|
||||
BreachRetribution: &lnwallet.BreachRetribution{
|
||||
BreachTransaction: bobClose.CloseTx,
|
||||
BreachTxHash: bobClose.CloseTx.TxHash(),
|
||||
LocalOutputSignDesc: &input.SignDescriptor{
|
||||
Output: &wire.TxOut{
|
||||
PkScript: breachKeys[0],
|
||||
@@ -1137,7 +1137,7 @@ func TestBreachHandoffFail(t *testing.T) {
|
||||
processACK <- brarErr
|
||||
},
|
||||
BreachRetribution: &lnwallet.BreachRetribution{
|
||||
BreachTransaction: bobClose.CloseTx,
|
||||
BreachTxHash: bobClose.CloseTx.TxHash(),
|
||||
LocalOutputSignDesc: &input.SignDescriptor{
|
||||
Output: &wire.TxOut{
|
||||
PkScript: breachKeys[0],
|
||||
@@ -1179,7 +1179,7 @@ func TestBreachHandoffFail(t *testing.T) {
|
||||
processACK <- brarErr
|
||||
},
|
||||
BreachRetribution: &lnwallet.BreachRetribution{
|
||||
BreachTransaction: bobClose.CloseTx,
|
||||
BreachTxHash: bobClose.CloseTx.TxHash(),
|
||||
LocalOutputSignDesc: &input.SignDescriptor{
|
||||
Output: &wire.TxOut{
|
||||
PkScript: breachKeys[0],
|
||||
|
||||
@@ -812,7 +812,7 @@ func (c *chainWatcher) handlePossibleBreach(commitSpend *chainntnfs.SpendDetail,
|
||||
// own broadcasted state we are looking at. Therefore check that the
|
||||
// commit matches before assuming it was a breach.
|
||||
commitHash := commitSpend.SpendingTx.TxHash()
|
||||
if retribution.BreachTransaction.TxHash() != commitHash {
|
||||
if retribution.BreachTxHash != commitHash {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user