diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-09-25 07:00:36 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2018-11-05 17:03:11 +0100 |
commit | 9cc0230cfc1ae9b9c1c905cd9ac613bc98bfa43a (patch) | |
tree | c3cd7df7ea0228dee67b7160ba960a6eba5bbac4 /src/core_io.h | |
parent | 579497e77a3a71b2d8e44a6a3e00a8a46366d5c0 (diff) |
Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool. Sort includes.
Diffstat (limited to 'src/core_io.h')
-rw-r--r-- | src/core_io.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core_io.h b/src/core_io.h index 2c3b64d81e..6f87161f46 100644 --- a/src/core_io.h +++ b/src/core_io.h @@ -6,6 +6,7 @@ #define BITCOIN_CORE_IO_H #include <amount.h> +#include <attributes.h> #include <string> #include <vector> @@ -22,8 +23,8 @@ class UniValue; // core_read.cpp CScript ParseScript(const std::string& s); std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false); -bool DecodeHexTx(CMutableTransaction& tx, const std::string& hex_tx, bool try_no_witness = false, bool try_witness = true); -bool DecodeHexBlk(CBlock&, const std::string& strHexBlk); +NODISCARD bool DecodeHexTx(CMutableTransaction& tx, const std::string& hex_tx, bool try_no_witness = false, bool try_witness = true); +NODISCARD bool DecodeHexBlk(CBlock&, const std::string& strHexBlk); bool DecodeHexBlockHeader(CBlockHeader&, const std::string& hex_header); /** @@ -36,7 +37,7 @@ bool DecodeHexBlockHeader(CBlockHeader&, const std::string& hex_header); */ bool ParseHashStr(const std::string& strHex, uint256& result); std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName); -bool DecodePSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error); +NODISCARD bool DecodePSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error); int ParseSighashString(const UniValue& sighash); // core_write.cpp |