@@ -5,10 +5,6 @@ import (
5
5
"testing"
6
6
7
7
"github.com/babylonchain/babylon/btcstaking"
8
- "github.com/babylonchain/cli-tools/internal/config"
9
- "github.com/babylonchain/cli-tools/internal/logger"
10
- "github.com/babylonchain/cli-tools/internal/mocks"
11
- "github.com/babylonchain/cli-tools/internal/services"
12
8
"github.com/btcsuite/btcd/btcec/v2"
13
9
"github.com/btcsuite/btcd/btcec/v2/schnorr"
14
10
"github.com/btcsuite/btcd/btcutil"
@@ -17,11 +13,16 @@ import (
17
13
"github.com/btcsuite/btcd/wire"
18
14
"github.com/golang/mock/gomock"
19
15
"github.com/stretchr/testify/require"
16
+
17
+ "github.com/babylonchain/cli-tools/internal/config"
18
+ "github.com/babylonchain/cli-tools/internal/logger"
19
+ "github.com/babylonchain/cli-tools/internal/mocks"
20
+ "github.com/babylonchain/cli-tools/internal/services"
20
21
)
21
22
22
23
var (
23
24
testParams = chaincfg .MainNetParams
24
- magicBytes = []byte {0x00 , 0x01 , 0x02 , 0x03 }
25
+ tag = []byte {0x00 , 0x01 , 0x02 , 0x03 }
25
26
)
26
27
27
28
type MockedDependencies struct {
@@ -56,7 +57,7 @@ func NewUnbondingData(
56
57
fpKey , err := btcec .NewPrivateKey ()
57
58
require .NoError (t , err )
58
59
stakingInfo , stakingTx , err := btcstaking .BuildV0IdentifiableStakingOutputsAndTx (
59
- magicBytes ,
60
+ tag ,
60
61
stakerPubKey ,
61
62
fpKey .PubKey (),
62
63
covenantInfo .GetCovenantPublicKeys (),
@@ -183,7 +184,7 @@ func TestValidSigningFlow(t *testing.T) {
183
184
deps .pr .EXPECT ().ParamsByHeight (gomock .Any (), uint64 (stakingTxHeight )).Return (& services.SystemParams {
184
185
CovenantPublicKeys : covenantMembers .GetCovenantPublicKeys (),
185
186
CovenantQuorum : covenantQuorum ,
186
- MagicBytes : magicBytes ,
187
+ Tag : tag ,
187
188
}, nil )
188
189
deps .cs .EXPECT ().SignUnbondingTransaction (gomock .Any ()).Return (covenantSignatures [0 ], nil )
189
190
deps .bs .EXPECT ().CheckTxOutSpendable (
@@ -229,7 +230,7 @@ func TestInvalidSignatureHandling(t *testing.T) {
229
230
deps .pr .EXPECT ().ParamsByHeight (gomock .Any (), uint64 (stakingTxHeight )).Return (& services.SystemParams {
230
231
CovenantPublicKeys : covenantMembers .GetCovenantPublicKeys (),
231
232
CovenantQuorum : covenantQuorum ,
232
- MagicBytes : magicBytes ,
233
+ Tag : tag ,
233
234
}, nil )
234
235
235
236
// tamper signature so it is invalid
0 commit comments