auctioneer+order: rename CurrentBatchVersion->LatestBatchVersion

To make sure the CurrentBatchVersion isn't used anywhere as the default
version anymore by accident, we explicitly rename it.
This commit is contained in:
Oliver Gugger 2021-12-21 14:35:50 +01:00
parent e52b1ff5a6
commit cd3b6b65bb
No known key found for this signature in database
GPG key ID: 8E4256593F177720
3 changed files with 9 additions and 11 deletions

View file

@ -45,7 +45,7 @@ func TestAccountSubscriptionAuthenticate(t *testing.T) {
sendMsg: sendMsg,
signer: testSigner,
msgChan: srvMsgChan,
batchVersion: order.CurrentBatchVersion,
batchVersion: order.LatestBatchVersion,
}
)
@ -108,7 +108,7 @@ func TestAccountSubscriptionAuthenticateAbort(t *testing.T) {
sendMsg: sendMsg,
signer: testSigner,
msgChan: srvMsgChan,
batchVersion: order.CurrentBatchVersion,
batchVersion: order.LatestBatchVersion,
}
)
@ -161,7 +161,7 @@ func TestAccountSubscriptionAuthenticateContextClose(t *testing.T) {
sendMsg: sendMsg,
signer: testSigner,
msgChan: srvMsgChan,
batchVersion: order.CurrentBatchVersion,
batchVersion: order.LatestBatchVersion,
}
ctxc, cancel = context.WithCancel(context.Background())
)
@ -216,7 +216,7 @@ func TestAccountSubscriptionAuthenticateError(t *testing.T) {
sendMsg: sendMsg,
signer: testSigner,
msgChan: srvMsgChan,
batchVersion: order.CurrentBatchVersion,
batchVersion: order.LatestBatchVersion,
errChan: make(chan error),
}
)

View file

@ -53,10 +53,8 @@ const (
)
const (
// CurrentBatchVersion points to the version used by the client for
// verifying a batch.
CurrentBatchVersion = ExtendAccountBatchVersion
// LatestBatchVersion points to the most recent batch version.
LatestBatchVersion = ExtendAccountBatchVersion
// LegacyLeaseDurationBucket is the single static duration bucket that
// was used for orders before dynamic duration buckets were added.

View file

@ -25,7 +25,7 @@ func TestValidateOrderAccountIsolation(t *testing.T) {
orderStore := newMockStore()
orderManager := NewManager(&ManagerConfig{
Store: orderStore,
BatchVersion: CurrentBatchVersion,
BatchVersion: LatestBatchVersion,
})
// We'll now create two accounts, one that's 1 BTC in size, while the
@ -111,7 +111,7 @@ func TestValidateOrder(t *testing.T) {
orderStore := newMockStore()
orderManager := NewManager(&ManagerConfig{
Store: orderStore,
BatchVersion: CurrentBatchVersion,
BatchVersion: LatestBatchVersion,
})
// We'll now create an account with sufficient size.
@ -272,7 +272,7 @@ func TestPrepareOrderSidecarTicket(t *testing.T) {
Wallet: test.NewMockWalletKit(),
Lightning: mockLightning,
Signer: mockSigner,
BatchVersion: CurrentBatchVersion,
BatchVersion: LatestBatchVersion,
})
require.NoError(t, mgr.Start())
defer mgr.Stop()