multi: thread thru the AuxLeafStore everywhere
This commit is contained in:
15 files changed
+194
-47
No files matched your search
@@ -5695,6 +5695,7 @@ func TestChannelUnilateralCloseHtlcResolution(t *testing.T) {
|
||||
spendDetail,
|
||||
aliceChannel.channelState.RemoteCommitment,
|
||||
aliceChannel.channelState.RemoteCurrentRevocation,
|
||||
fn.Some[AuxLeafStore](&MockAuxLeafStore{}),
|
||||
)
|
||||
require.NoError(t, err, "unable to create alice close summary")
|
||||
|
||||
@@ -5844,6 +5845,7 @@ func TestChannelUnilateralClosePendingCommit(t *testing.T) {
|
||||
spendDetail,
|
||||
aliceChannel.channelState.RemoteCommitment,
|
||||
aliceChannel.channelState.RemoteCurrentRevocation,
|
||||
fn.Some[AuxLeafStore](&MockAuxLeafStore{}),
|
||||
)
|
||||
require.NoError(t, err, "unable to create alice close summary")
|
||||
|
||||
@@ -5861,6 +5863,7 @@ func TestChannelUnilateralClosePendingCommit(t *testing.T) {
|
||||
spendDetail,
|
||||
aliceRemoteChainTip.Commitment,
|
||||
aliceChannel.channelState.RemoteNextRevocation,
|
||||
fn.Some[AuxLeafStore](&MockAuxLeafStore{}),
|
||||
)
|
||||
require.NoError(t, err, "unable to create alice close summary")
|
||||
|
||||
@@ -6741,6 +6744,7 @@ func TestNewBreachRetributionSkipsDustHtlcs(t *testing.T) {
|
||||
breachTx := aliceChannel.channelState.RemoteCommitment.CommitTx
|
||||
breachRet, err := NewBreachRetribution(
|
||||
aliceChannel.channelState, revokedStateNum, 100, breachTx,
|
||||
fn.Some[AuxLeafStore](&MockAuxLeafStore{}),
|
||||
)
|
||||
require.NoError(t, err, "unable to create breach retribution")
|
||||
|
||||
@@ -10291,6 +10295,7 @@ func testNewBreachRetribution(t *testing.T, chanType channeldb.ChannelType) {
|
||||
// error as there are no past delta state saved as revocation logs yet.
|
||||
_, err = NewBreachRetribution(
|
||||
aliceChannel.channelState, stateNum, breachHeight, breachTx,
|
||||
fn.None[AuxLeafStore](),
|
||||
)
|
||||
require.ErrorIs(t, err, channeldb.ErrNoPastDeltas)
|
||||
|
||||
@@ -10298,6 +10303,7 @@ func testNewBreachRetribution(t *testing.T, chanType channeldb.ChannelType) {
|
||||
// provided.
|
||||
_, err = NewBreachRetribution(
|
||||
aliceChannel.channelState, stateNum, breachHeight, nil,
|
||||
fn.None[AuxLeafStore](),
|
||||
)
|
||||
require.ErrorIs(t, err, channeldb.ErrNoPastDeltas)
|
||||
|
||||
@@ -10343,6 +10349,7 @@ func testNewBreachRetribution(t *testing.T, chanType channeldb.ChannelType) {
|
||||
// successfully.
|
||||
br, err := NewBreachRetribution(
|
||||
aliceChannel.channelState, stateNum, breachHeight, breachTx,
|
||||
fn.Some[AuxLeafStore](&MockAuxLeafStore{}),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -10354,6 +10361,7 @@ func testNewBreachRetribution(t *testing.T, chanType channeldb.ChannelType) {
|
||||
// since the necessary info should now be found in the revocation log.
|
||||
br, err = NewBreachRetribution(
|
||||
aliceChannel.channelState, stateNum, breachHeight, nil,
|
||||
fn.Some[AuxLeafStore](&MockAuxLeafStore{}),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
assertRetribution(br, 1, 0)
|
||||
@@ -10362,6 +10370,7 @@ func testNewBreachRetribution(t *testing.T, chanType channeldb.ChannelType) {
|
||||
// error.
|
||||
_, err = NewBreachRetribution(
|
||||
aliceChannel.channelState, stateNum+1, breachHeight, breachTx,
|
||||
fn.Some[AuxLeafStore](&MockAuxLeafStore{}),
|
||||
)
|
||||
require.ErrorIs(t, err, channeldb.ErrLogEntryNotFound)
|
||||
|
||||
@@ -10369,6 +10378,7 @@ func testNewBreachRetribution(t *testing.T, chanType channeldb.ChannelType) {
|
||||
// provided.
|
||||
_, err = NewBreachRetribution(
|
||||
aliceChannel.channelState, stateNum+1, breachHeight, nil,
|
||||
fn.Some[AuxLeafStore](&MockAuxLeafStore{}),
|
||||
)
|
||||
require.ErrorIs(t, err, channeldb.ErrLogEntryNotFound)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user