mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-09 08:41:15 +08:00
don't allow transfer if we're in the renewal grace period
This commit is contained in:
@@ -181,11 +181,16 @@ def check( state_engine, nameop, block_id, checked_ops ):
|
||||
log.debug("Name '%s' is revoked" % name)
|
||||
return False
|
||||
|
||||
# name must not be expired
|
||||
# name must not be expired as of the *last block processed*
|
||||
if state_engine.is_name_expired( name, state_engine.lastblock ):
|
||||
log.debug("Name '%s' is expired" % name)
|
||||
return False
|
||||
|
||||
# name must not be in grace period in this block
|
||||
if state_engine.is_name_in_grace_period(name, block_id):
|
||||
log.debug("Name '{}' is in the renewal grace period. It can only be renewed at this time.".format(name))
|
||||
return False
|
||||
|
||||
if not state_engine.is_consensus_hash_valid( block_id, consensus_hash ):
|
||||
# invalid concensus hash
|
||||
log.debug("Invalid consensus hash '%s'" % consensus_hash )
|
||||
|
||||
Reference in New Issue
Block a user