Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Update getblockcommitments RPC to fix OSX action
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptAxe committed May 25, 2024
1 parent 1513c7e commit b5e5df0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ UniValue getblockcommitments(const JSONRPCRequest& request)
std::string strPrev = "";
if (data.IsBMMRequest(nSidechain, strPrev)) {
UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("txout", i));
obj.push_back(Pair("txout", (int64_t)i));
obj.push_back(Pair("type", "BMM h*"));
obj.push_back(Pair("h", hashCritical.ToString()));
obj.push_back(Pair("nsidechain", nSidechain));
Expand All @@ -1695,7 +1695,7 @@ UniValue getblockcommitments(const JSONRPCRequest& request)
uint8_t nSidechain = -1;
if (scriptPubKey.IsWithdrawalHashCommit(hashWithdrawal, nSidechain)) {
UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("txout", i));
obj.push_back(Pair("txout", (int64_t)i));
obj.push_back(Pair("type", "Withdrawal bundle hash"));
obj.push_back(Pair("hash", hashWithdrawal.ToString()));
obj.push_back(Pair("nsidechain", nSidechain));
Expand All @@ -1706,7 +1706,7 @@ UniValue getblockcommitments(const JSONRPCRequest& request)

if (scriptPubKey.IsSidechainProposalCommit()) {
UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("txout", i));
obj.push_back(Pair("txout", (int64_t)i));
obj.push_back(Pair("type", "Sidechain proposal"));
arr.push_back(obj);

Expand All @@ -1716,7 +1716,7 @@ UniValue getblockcommitments(const JSONRPCRequest& request)
uint256 hashSidechain;
if (scriptPubKey.IsSidechainActivationCommit(hashSidechain)) {
UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("txout", i));
obj.push_back(Pair("txout", (int64_t)i));
obj.push_back(Pair("type", "Sidechain activation ack"));
obj.push_back(Pair("hash", hashSidechain.ToString()));
arr.push_back(obj);
Expand All @@ -1726,7 +1726,7 @@ UniValue getblockcommitments(const JSONRPCRequest& request)

if (scriptPubKey.IsSCDBBytes()) {
UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("txout", i));
obj.push_back(Pair("txout", (int64_t)i));
obj.push_back(Pair("type", "SCDB update bytes"));
obj.push_back(Pair("script", ScriptToAsmStr(scriptPubKey)));
arr.push_back(obj);
Expand All @@ -1742,7 +1742,7 @@ UniValue getblockcommitments(const JSONRPCRequest& request)
scriptPubKey[5] == 0xed) {

UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("txout", i));
obj.push_back(Pair("txout", (int64_t)i));
obj.push_back(Pair("type", "Witness commitment"));
obj.push_back(Pair("script", ScriptToAsmStr(scriptPubKey)));
arr.push_back(obj);
Expand Down

0 comments on commit b5e5df0

Please sign in to comment.