tsh tests / update setregularkey tsh

This commit is contained in:
Richard Holland
2022-05-09 08:13:04 +00:00
parent 74b0f20108
commit ec78ef7ddb
6 changed files with 144 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ namespace hook
{ttESCROW_FINISH, tshROLLBACK },
{ttACCOUNT_SET, tshNONE },
{ttESCROW_CANCEL, tshCOLLECT },
{ttREGULAR_KEY_SET, tshNONE },
{ttREGULAR_KEY_SET, tshROLLBACK },
{ttOFFER_CREATE, tshCOLLECT },
{ttOFFER_CANCEL, tshNONE },
{ttTICKET_CREATE, tshNONE },

View File

@@ -73,7 +73,6 @@ namespace hook
// self transactions
case ttACCOUNT_SET:
case ttOFFER_CANCEL:
case ttREGULAR_KEY_SET:
case ttTICKET_CREATE:
case ttHOOK_SET:
case ttOFFER_CREATE: // this is handled seperately
@@ -81,6 +80,14 @@ namespace hook
break;
}
case ttREGULAR_KEY_SET:
{
if (!tx.isFieldPresent(sfRegularKey))
return {};
ADD_TSH(tx.getAccountID(sfRegularKey), canRollback);
break;
}
case ttDEPOSIT_PREAUTH:
{
if (!tx.isFieldPresent(sfAuthorize))