From 339b40bfb410bd4bd8b99b0f07cbf73feef9abdd Mon Sep 17 00:00:00 2001 From: Richard Holland Date: Sat, 17 Dec 2022 17:02:18 +0000 Subject: [PATCH] filter for ttclaimreward until hookon is expanded to 256bits --- hook/reward_hook.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hook/reward_hook.c b/hook/reward_hook.c index 954049e76..05b37025e 100644 --- a/hook/reward_hook.c +++ b/hook/reward_hook.c @@ -11,6 +11,13 @@ int64_t hook(uint32_t r) etxn_reserve(1); _g(1,1); + uint8_t ttbuf[16]; + int64_t br = otxn_field(SBUF(ttbuf), sfTransactionType); + uint32_t txntype = ((uint32_t)(ttbuf[0]) << 16U) + ((uint32_t)(ttbuf[1])); + + if (txntype != 98) + accept(0,0,0); + // get the account id uint8_t account_field[20]; ASSERT(otxn_field(SBUF(account_field), sfAccount) == 20);