Skip to content

Commit

Permalink
Merge bitcoin#885: Rename Mastercoin to Omni Layer in error message
Browse files Browse the repository at this point in the history
299f042 Rename Mastercoin to Omni Layer in error message (dexX7)
  • Loading branch information
dexX7 committed Feb 14, 2019
2 parents 6eb3f8a + 299f042 commit 4cccf20
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/omnicore/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum MPRPCErrorCode
MP_BLOCK_NOT_IN_CHAIN = -3333, // Transaction not part of the active chain. (pBlockIndex is NULL)
MP_CROWDSALE_WITHOUT_PROPERTY = -3334, // Potential database corruption: "Crowdsale Purchase" without valid property identifier.
MP_INVALID_TX_IN_DB_FOUND = -3335, // Potential database corruption: Invalid transaction found.
MP_TX_IS_NOT_MASTER_PROTOCOL = -3336, // Not a Master Protocol transaction.
MP_TX_IS_NOT_OMNI_PROTOCOL = -3336, // No Omni Layer Protocol transaction.
};

inline std::string error_str(int ec) {
Expand All @@ -46,7 +46,7 @@ inline std::string error_str(int ec) {
ec_str = "Not enough funds in user address due to PENDING/UNCONFIRMED transactions";
break;
case MP_INPUT_NOT_IN_RANGE:
ec_str = "Input value supplied larger than supported in Master Protocol";
ec_str = "Input value supplied larger than supported in Omni Layer Protocol";
break;
case MP_INPUTS_INVALID:
ec_str = "Error choosing inputs for the send transaction";
Expand Down
6 changes: 3 additions & 3 deletions src/omnicore/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ void PopulateFailure(int error)
\"Crowdsale Purchase\" without valid property identifier");
case MP_INVALID_TX_IN_DB_FOUND:
throw JSONRPCError(RPC_INTERNAL_ERROR, "Potential database corruption: Invalid transaction found");
case MP_TX_IS_NOT_MASTER_PROTOCOL:
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Not a Master Protocol transaction");
case MP_TX_IS_NOT_OMNI_PROTOCOL:
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No Omni Layer Protocol transaction");
}
throw JSONRPCError(RPC_INTERNAL_ERROR, "Generic transaction population failure");
}
Expand Down Expand Up @@ -546,7 +546,7 @@ UniValue omni_getpayload(const UniValue& params, bool fHelp)

CMPTransaction mp_obj;
int parseRC = ParseTransaction(tx, blockHeight, 0, mp_obj, blockTime);
if (parseRC < 0) PopulateFailure(MP_TX_IS_NOT_MASTER_PROTOCOL);
if (parseRC < 0) PopulateFailure(MP_TX_IS_NOT_OMNI_PROTOCOL);

UniValue payloadObj(UniValue::VOBJ);
payloadObj.push_back(Pair("payload", mp_obj.getPayload()));
Expand Down
4 changes: 2 additions & 2 deletions src/omnicore/rpctxobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ int populateRPCTransactionObject(const CTransaction& tx, const uint256& blockHas
// attempt to parse the transaction
CMPTransaction mp_obj;
int parseRC = ParseTransaction(tx, blockHeight, 0, mp_obj, blockTime);
if (parseRC < 0) return MP_TX_IS_NOT_MASTER_PROTOCOL;
if (parseRC < 0) return MP_TX_IS_NOT_OMNI_PROTOCOL;

const uint256& txid = tx.GetHash();

Expand Down Expand Up @@ -117,7 +117,7 @@ int populateRPCTransactionObject(const CTransaction& tx, const uint256& blockHas
if (!filterAddress.empty() && mp_obj.getSender() != filterAddress && mp_obj.getReceiver() != filterAddress) return -1;

// parse packet and populate mp_obj
if (!mp_obj.interpret_Transaction()) return MP_TX_IS_NOT_MASTER_PROTOCOL;
if (!mp_obj.interpret_Transaction()) return MP_TX_IS_NOT_OMNI_PROTOCOL;

// obtain validity - only confirmed transactions can be valid
bool valid = false;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/lookuptxdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void LookupTXDialog::searchTX()
"confirmed transactions.\n\nTip: You can view your own outgoing unconfirmed "
"transactions in the transactions tab.";
break;
case MP_TX_IS_NOT_MASTER_PROTOCOL:
case MP_TX_IS_NOT_OMNI_PROTOCOL:
strText += "a Bitcoin transaction only.\n\nTip: You can use the debug console "
"'gettransaction' command to lookup specific Bitcoin transactions.";
break;
Expand Down

0 comments on commit 4cccf20

Please sign in to comment.