@@ -692,21 +692,10 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
692692 tx = mergedTx;
693693}
694694
695- class Secp256k1Init
696- {
697- public:
698- Secp256k1Init () {
699- ECC_Start ();
700- }
701- ~Secp256k1Init () {
702- ECC_Stop ();
703- }
704- };
705-
706695static void MutateTx (CMutableTransaction& tx, const std::string& command,
707696 const std::string& commandVal)
708697{
709- std::unique_ptr<Secp256k1Init > ecc;
698+ std::unique_ptr<ECC_Context > ecc;
710699
711700 if (command == " nversion" )
712701 MutateTxVersion (tx, commandVal);
@@ -726,18 +715,18 @@ static void MutateTx(CMutableTransaction& tx, const std::string& command,
726715 else if (command == " outaddr" )
727716 MutateTxAddOutAddr (tx, commandVal);
728717 else if (command == " outpubkey" ) {
729- ecc.reset (new Secp256k1Init ());
718+ ecc.reset (new ECC_Context ());
730719 MutateTxAddOutPubKey (tx, commandVal);
731720 } else if (command == " outmultisig" ) {
732- ecc.reset (new Secp256k1Init ());
721+ ecc.reset (new ECC_Context ());
733722 MutateTxAddOutMultiSig (tx, commandVal);
734723 } else if (command == " outscript" )
735724 MutateTxAddOutScript (tx, commandVal);
736725 else if (command == " outdata" )
737726 MutateTxAddOutData (tx, commandVal);
738727
739728 else if (command == " sign" ) {
740- ecc.reset (new Secp256k1Init ());
729+ ecc.reset (new ECC_Context ());
741730 MutateTxSign (tx, commandVal);
742731 }
743732
0 commit comments