@@ -692,21 +692,10 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
692
692
tx = mergedTx;
693
693
}
694
694
695
- class Secp256k1Init
696
- {
697
- public:
698
- Secp256k1Init () {
699
- ECC_Start ();
700
- }
701
- ~Secp256k1Init () {
702
- ECC_Stop ();
703
- }
704
- };
705
-
706
695
static void MutateTx (CMutableTransaction& tx, const std::string& command,
707
696
const std::string& commandVal)
708
697
{
709
- std::unique_ptr<Secp256k1Init > ecc;
698
+ std::unique_ptr<ECC_Context > ecc;
710
699
711
700
if (command == " nversion" )
712
701
MutateTxVersion (tx, commandVal);
@@ -726,18 +715,18 @@ static void MutateTx(CMutableTransaction& tx, const std::string& command,
726
715
else if (command == " outaddr" )
727
716
MutateTxAddOutAddr (tx, commandVal);
728
717
else if (command == " outpubkey" ) {
729
- ecc.reset (new Secp256k1Init ());
718
+ ecc.reset (new ECC_Context ());
730
719
MutateTxAddOutPubKey (tx, commandVal);
731
720
} else if (command == " outmultisig" ) {
732
- ecc.reset (new Secp256k1Init ());
721
+ ecc.reset (new ECC_Context ());
733
722
MutateTxAddOutMultiSig (tx, commandVal);
734
723
} else if (command == " outscript" )
735
724
MutateTxAddOutScript (tx, commandVal);
736
725
else if (command == " outdata" )
737
726
MutateTxAddOutData (tx, commandVal);
738
727
739
728
else if (command == " sign" ) {
740
- ecc.reset (new Secp256k1Init ());
729
+ ecc.reset (new ECC_Context ());
741
730
MutateTxSign (tx, commandVal);
742
731
}
743
732
0 commit comments