-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runtime) DeleteAccount action must be the last action (#2829)
In order to avoid dDos we disallow to have DeleteAccount to be not a last action in Receipt. @vgrichina this contains a new rpc error type to handle fixes #2599
- Loading branch information
Showing
6 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Adds an assert for the Action::DeleteAccount to be the last action in Receipt | ||
""" | ||
|
||
import sys | ||
import os | ||
import json | ||
from collections import OrderedDict | ||
|
||
home = sys.argv[1] | ||
output_home = sys.argv[2] | ||
|
||
config = json.load(open(os.path.join(home, 'output.json')), object_pairs_hook=OrderedDict) | ||
|
||
assert config['protocol_version'] == 22 | ||
|
||
config['protocol_version'] = 23 | ||
|
||
json.dump(config, open(os.path.join(output_home, 'output.json'), 'w'), indent=2) |