File tree Expand file tree Collapse file tree
common/src/main/java/org/tron/core
framework/src/test/java/org/tron/core/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public class Constant {
4040 public static final long PB_DEFAULT_ENERGY_LIMIT = 0L ;
4141 public static final long CREATOR_DEFAULT_ENERGY_LIMIT = 1000 * 10_000L ;
4242 public static final long MIN_PROPOSAL_EXPIRE_TIME = 0L ; // 0 ms
43- public static final long MAX_PROPOSAL_EXPIRE_TIME = 31536000000L ; // ms of 365 days
43+ public static final long MAX_PROPOSAL_EXPIRE_TIME = 31536003000L ; // ms of 365 days + 3000 ms
4444 public static final long DEFAULT_PROPOSAL_EXPIRE_TIME = 259200000L ; // ms of 3 days
4545
4646
Original file line number Diff line number Diff line change @@ -141,14 +141,14 @@ public void testProposalExpireTime() {
141141 Assert .assertEquals (proposalExpireTime , defaultWindow );
142142
143143 Proposal proposal = Proposal .newBuilder ().putParameters (PROPOSAL_EXPIRE_TIME .getCode (),
144- MAX_PROPOSAL_EXPIRE_TIME ).build ();
144+ 31536000000L ).build ();
145145 ProposalCapsule proposalCapsule = new ProposalCapsule (proposal );
146146 proposalCapsule .setExpirationTime (1627279200000L );
147147 boolean result = ProposalService .process (dbManager , proposalCapsule );
148148 Assert .assertTrue (result );
149149
150150 long window = dbManager .getDynamicPropertiesStore ().getProposalExpireTime ();
151- Assert .assertEquals (MAX_PROPOSAL_EXPIRE_TIME , window );
151+ Assert .assertEquals (MAX_PROPOSAL_EXPIRE_TIME - 3000 , window );
152152 }
153153
154154}
You can’t perform that action at this time.
0 commit comments