blocknetdx / blocknet

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

[bug] incorrect state logging messages #578

Open rikublock opened 2 years ago

rikublock commented 2 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".