@@ -694,21 +694,10 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
694694 tx = mergedTx;
695695}
696696
697- class Secp256k1Init
698- {
699- public:
700- Secp256k1Init () {
701- ECC_Start ();
702- }
703- ~Secp256k1Init () {
704- ECC_Stop ();
705- }
706- };
707-
708697static void MutateTx (CMutableTransaction& tx, const std::string& command,
709698 const std::string& commandVal)
710699{
711- std::unique_ptr<Secp256k1Init > ecc;
700+ std::unique_ptr<ECC_Context > ecc;
712701
713702 if (command == " nversion" )
714703 MutateTxVersion (tx, commandVal);
@@ -728,18 +717,18 @@ static void MutateTx(CMutableTransaction& tx, const std::string& command,
728717 else if (command == " outaddr" )
729718 MutateTxAddOutAddr (tx, commandVal);
730719 else if (command == " outpubkey" ) {
731- ecc.reset (new Secp256k1Init ());
720+ ecc.reset (new ECC_Context ());
732721 MutateTxAddOutPubKey (tx, commandVal);
733722 } else if (command == " outmultisig" ) {
734- ecc.reset (new Secp256k1Init ());
723+ ecc.reset (new ECC_Context ());
735724 MutateTxAddOutMultiSig (tx, commandVal);
736725 } else if (command == " outscript" )
737726 MutateTxAddOutScript (tx, commandVal);
738727 else if (command == " outdata" )
739728 MutateTxAddOutData (tx, commandVal);
740729
741730 else if (command == " sign" ) {
742- ecc.reset (new Secp256k1Init ());
731+ ecc.reset (new ECC_Context ());
743732 MutateTxSign (tx, commandVal);
744733 }
745734
0 commit comments