aboutsummaryrefslogtreecommitdiff
path: root/src/core_write.cpp
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-06-10 22:19:07 -0700
committerBen Woosley <ben.woosley@gmail.com>2018-07-22 21:37:00 -0400
commit984d72ec659361d8c1a6f3c6864e839a807817a7 (patch)
tree893e16d6f36458f1925bb54bca43fc7674336e82 /src/core_write.cpp
parent0a34593ddb7a6d10c19533754d7a23345a155986 (diff)
Return the script type from Solver
Because false is synonymous with TX_NONSTANDARD, this conveys the same information and makes the handling explicitly based on script type, simplifying each call site. Prior to this change it was common for the return value to be ignored, or for the return value and TX_NONSTANDARD to be redundantly handled.
Diffstat (limited to 'src/core_write.cpp')
-rw-r--r--src/core_write.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 1272266235..ec6a7d1321 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -141,8 +141,7 @@ void ScriptToUniv(const CScript& script, UniValue& out, bool include_address)
out.pushKV("hex", HexStr(script.begin(), script.end()));
std::vector<std::vector<unsigned char>> solns;
- txnouttype type;
- Solver(script, type, solns);
+ txnouttype type = Solver(script, solns);
out.pushKV("type", GetTxnOutputType(type));
CTxDestination address;