@@ -131,13 +131,13 @@ std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags)
131131{
132132 CDataStream ssTx (SER_NETWORK, PROTOCOL_VERSION | serializeFlags);
133133 ssTx << tx;
134- return HexStr (ssTx. begin (), ssTx. end () );
134+ return HexStr (ssTx);
135135}
136136
137137void ScriptToUniv (const CScript& script, UniValue& out, bool include_address)
138138{
139139 out.pushKV (" asm" , ScriptToAsmStr (script));
140- out.pushKV (" hex" , HexStr (script. begin (), script. end () ));
140+ out.pushKV (" hex" , HexStr (script));
141141
142142 std::vector<std::vector<unsigned char >> solns;
143143 txnouttype type = Solver (script, solns);
@@ -158,7 +158,7 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey,
158158
159159 out.pushKV (" asm" , ScriptToAsmStr (scriptPubKey));
160160 if (fIncludeHex )
161- out.pushKV (" hex" , HexStr (scriptPubKey. begin (), scriptPubKey. end () ));
161+ out.pushKV (" hex" , HexStr (scriptPubKey));
162162
163163 if (!ExtractDestinations (scriptPubKey, type, addresses, nRequired) || type == TX_PUBKEY) {
164164 out.pushKV (" type" , GetTxnOutputType (type));
@@ -190,19 +190,19 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
190190 const CTxIn& txin = tx.vin [i];
191191 UniValue in (UniValue::VOBJ);
192192 if (tx.IsCoinBase ())
193- in.pushKV (" coinbase" , HexStr (txin.scriptSig . begin (), txin. scriptSig . end () ));
193+ in.pushKV (" coinbase" , HexStr (txin.scriptSig ));
194194 else {
195195 in.pushKV (" txid" , txin.prevout .hash .GetHex ());
196196 in.pushKV (" vout" , (int64_t )txin.prevout .n );
197197 UniValue o (UniValue::VOBJ);
198198 o.pushKV (" asm" , ScriptToAsmStr (txin.scriptSig , true ));
199- o.pushKV (" hex" , HexStr (txin.scriptSig . begin (), txin. scriptSig . end () ));
199+ o.pushKV (" hex" , HexStr (txin.scriptSig ));
200200 in.pushKV (" scriptSig" , o);
201201 }
202202 if (!tx.vin [i].scriptWitness .IsNull ()) {
203203 UniValue txinwitness (UniValue::VARR);
204204 for (const auto & item : tx.vin [i].scriptWitness .stack ) {
205- txinwitness.push_back (HexStr (item. begin (), item. end () ));
205+ txinwitness.push_back (HexStr (item));
206206 }
207207 in.pushKV (" txinwitness" , txinwitness);
208208 }
0 commit comments