From 7145bcfee8bdec4e2d73d9414dba7c57e6dc2d4d Mon Sep 17 00:00:00 2001 From: Jude Nelson Date: Tue, 26 Sep 2017 16:30:09 -0400 Subject: [PATCH] don't allow transfer if we're in the renewal grace period --- blockstack/lib/operations/transfer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blockstack/lib/operations/transfer.py b/blockstack/lib/operations/transfer.py index 2f099508d..a1b7afb50 100644 --- a/blockstack/lib/operations/transfer.py +++ b/blockstack/lib/operations/transfer.py @@ -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 )