more todo cleanup

This commit is contained in:
Richard Holland
2023-01-17 11:28:15 +00:00
parent 0209c98c75
commit 5f913b5897
3 changed files with 11 additions and 5 deletions

View File

@@ -647,8 +647,6 @@ unserialize_keylet(uint8_t* ptr, uint32_t len)
}
// RH TODO: this is used by sethook to determine the value stored in ltHOOK
// replace this with votable value
uint32_t hook::maxHookStateDataSize(void) {
return 256U;
}
@@ -2877,6 +2875,7 @@ DEFINE_HOOK_FUNCTION(
// check the emitted txn is valid
/* Emitted TXN rules
* 0. Account must match the hook account
* 1. Sequence: 0
* 2. PubSigningKey: 000000000000000
* 3. sfEmitDetails present and valid
@@ -2887,6 +2886,13 @@ DEFINE_HOOK_FUNCTION(
* 8. The generation cannot be higher than 10
*/
// rule 0: account must match the hook account
if (!stpTrans->isFieldPresent(sfAccount) || stpTrans->getAccountID(sfAccount) != hookCtx.result.account)
{
JLOG(j.trace())
<< "HookEmit[" << HC_ACC() << "]: sfAccount does not match hook account";
return EMISSION_FAILURE;
}
// rule 1: sfSequence must be present and 0
if (!stpTrans->isFieldPresent(sfSequence) || stpTrans->getFieldU32(sfSequence) != 0)

View File

@@ -1546,8 +1546,8 @@ PeerImp::handleTransaction(
if (stx->isFieldPresent(sfEmitDetails))
{
JLOG(p_journal_.warn()) << "Ignoring Network relayed Tx containing sfEmitDetails (handleTransaction).";
//fee_ = Resource::feeHighBurdenPeer; // RH TODO: enable when relay bug is fixed
//return;
//fee_ = Resource::feeHighBurdenPeer; // RH TODO: fix
return;
}
int flags;

View File

@@ -74,7 +74,7 @@ LedgerHandler::check()
// Until some sane way to get full ledgers has been implemented,
// disallow retrieving all state nodes.
uint32_t nodeNID = ctx.app.config().NETWORK_ID;
uint32_t nodeNID = context_.app.config().NETWORK_ID;
if (nodeNID == 21337)
{
// RH NOTE: production network requires rpc permission to dump full ledger