rpc: include height in spentinfo

This commit is contained in:
Braydon Fuller
2016-04-12 15:31:19 -04:00
committed by Braydon Fuller
parent b752fbe09e
commit abe40712ce
3 changed files with 4 additions and 0 deletions

View File

@@ -737,6 +737,7 @@ UniValue getspentinfo(const UniValue& params, bool fHelp)
UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("txid", value.txid.GetHex()));
obj.push_back(Pair("index", (int)value.inputIndex));
obj.push_back(Pair("height", value.blockHeight));
return obj;
}

View File

@@ -99,6 +99,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
if (GetSpentIndex(spentKey, spentInfo)) {
out.push_back(Pair("spentTxId", spentInfo.txid.GetHex()));
out.push_back(Pair("spentIndex", (int)spentInfo.inputIndex));
out.push_back(Pair("spentHeight", spentInfo.blockHeight));
}
vout.push_back(out);