Make DecodeHexTx return a CMutableTransaction

This commit is contained in:
Pieter Wuille
2016-11-30 14:50:20 -08:00
parent c3f5673a63
commit 42fd8dee30
6 changed files with 17 additions and 18 deletions

View File

@@ -623,7 +623,7 @@ static int CommandLineRawTx(int argc, char* argv[])
argv++;
}
CTransaction txDecodeTmp;
CMutableTransaction tx;
int startArg;
if (!fCreateBlank) {
@@ -636,15 +636,13 @@ static int CommandLineRawTx(int argc, char* argv[])
if (strHexTx == "-") // "-" implies standard input
strHexTx = readStdin();
if (!DecodeHexTx(txDecodeTmp, strHexTx, true))
if (!DecodeHexTx(tx, strHexTx, true))
throw std::runtime_error("invalid transaction encoding");
startArg = 2;
} else
startArg = 1;
CMutableTransaction tx(txDecodeTmp);
for (int i = startArg; i < argc; i++) {
std::string arg = argv[i];
std::string key, value;