This repository was archived by the owner on May 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -852,15 +852,10 @@ def increment_nonce(self, address):
852
852
:param address: the address of the account (binary or hex string)
853
853
:returns: `True` if successful, otherwise `False`
854
854
"""
855
- return self ._delta_item (address , 'nonce' , 1 )
856
-
857
- def decrement_nonce (self , address ):
858
- """Decrement the nonce of an account.
859
-
860
- :param address: the address of the account (binary or hex string)
861
- :returns: `True` if successful, otherwise `False`
862
- """
863
- return self ._delta_item (address , 'nonce' , - 1 )
855
+ if self .get_nonce (address ) == 0 :
856
+ return self ._delta_item (address , 'nonce' , self .config ['STARTING_ACCT_NONCE' ] + 1 )
857
+ else :
858
+ return self ._delta_item (address , 'nonce' , 1 )
864
859
865
860
def get_balance (self , address ):
866
861
"""Get the balance of an account.
Original file line number Diff line number Diff line change 40
40
MAX_EXTRADATA_LENGTH = 32 ,
41
41
# Exponential difficulty timebomb period
42
42
EXPDIFF_PERIOD = 100000 ,
43
- EXPDIFF_FREE_PERIODS = 2
43
+ EXPDIFF_FREE_PERIODS = 2 ,
44
+ # Starting nonce
45
+ STARTING_ACCT_NONCE = 0
44
46
)
45
47
assert default_config ['NEPHEW_REWARD' ] == \
46
48
default_config ['BLOCK_REWARD' ] // 32
You can’t perform that action at this time.
0 commit comments