Commit 2c50400
authored
fix(security): cover consumed permission-change tx in getVerifyTxs (#6796)
Initialize multiAddresses from ownerAddressSet so that getVerifyTxs
still forces re-verification of an owner's later txs even after the
owner's permission-change tx has been packed and is no longer present
in pendingTransactions.
Main changes:
- Manager.getVerifyTxs: seed multiAddresses with ownerAddressSet to
cover the case where a permission-change tx has been consumed but
ownerAddressSet still retains the owner (kept alive by in-flight
txs in pushTransactionQueue / rePushTransactions via
filterOwnerAddress).
- ManagerTest: add getVerifyTxsSkipsBlockWhenPermissionTxAlreadyConsumed
reproducing the bypass — pending contains only B (transfer, old sig,
isVerified=true), ownerAddressSet contains the owner, block contains
only B without the permission-change tx. Assertion checks B is placed
in the re-verify list instead of being short-circuited via setVerified.1 parent 78bc75d commit 2c50400
2 files changed
Lines changed: 43 additions & 1 deletion
File tree
- framework/src
- main/java/org/tron/core/db
- test/java/org/tron/core/db
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1235 | 1235 | | |
1236 | 1236 | | |
1237 | 1237 | | |
1238 | | - | |
| 1238 | + | |
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
| |||
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
876 | 877 | | |
877 | 878 | | |
878 | 879 | | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
879 | 921 | | |
880 | 922 | | |
881 | 923 | | |
| |||
0 commit comments