blocknetdx / blocknet

Official Blocknet cryptocurrency wallet
https://www.blocknet.org
MIT License
214 stars 94 forks source link

[bug] incorrect state logging messages #578

Open rikublock opened 3 years ago

rikublock commented 3 years ago

Currently a majority of log message print the wrong expected tx state.

Example:

    if (xtx->state >= TransactionDescr::trInitialized)
    {
        UniValue log_obj(UniValue::VOBJ);
        log_obj.pushKV("orderid", txid.GetHex());
        log_obj.pushKV("state", xtx->state);
        LogOrderMsg(log_obj, "wrong tx state, expecting initialized state", __FUNCTION__);
        return true;
    }

Check is xtx->state >= TransactionDescr::trCommited, but the message should read "wrong tx state, expecting hold state".