Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include "utilmoneystr.h"
#include "utilstrencodings.h"

#include <stdio.h>

Copy link
Contributor

@paveljanik paveljanik Oct 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is the only valid change right now.
...
But as we use fprintf to stderr for printing error messages...

#include <boost/algorithm/string.hpp>

static bool fCreateBlank;
Expand Down Expand Up @@ -250,7 +248,7 @@ static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInpu
// extract the optional sequence number
uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max();
if (vStrInputParts.size() > 2)
nSequenceIn = std::stoul(vStrInputParts[2]);
nSequenceIn = stoul(vStrInputParts[2], 0, 10);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep using the fully-qualified name


// append to transaction input list
CTxIn txin(txid, vout, CScript(), nSequenceIn);
Expand Down Expand Up @@ -340,10 +338,10 @@ static void MutateTxAddOutMultiSig(CMutableTransaction& tx, const std::string& s
CAmount value = ExtractAndValidateValue(vStrInputParts[0]);

// Extract REQUIRED
uint32_t required = stoul(vStrInputParts[1]);
uint32_t required = stoul(vStrInputParts[1], 0, 10);

// Extract NUMKEYS
uint32_t numkeys = stoul(vStrInputParts[2]);
uint32_t numkeys = stoul(vStrInputParts[2], 0, 10);

// Validate there are the correct number of pubkeys
if (vStrInputParts.size() < numkeys + 3)
Expand Down