File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/AElf.WebApp.Application.Chain/Services Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,16 @@ await _transactionResultProxyService.InvalidTransactionResultService.GetInvalidT
119119 }
120120 }
121121
122+ var chain = await _blockchainService . GetChainAsync ( ) ;
123+ if ( chain . BestChainHeight - output . Transaction . RefBlockNumber > KernelConstants . ReferenceBlockValidPeriod
124+ && transactionResult . Status == TransactionResultStatus . NotExisted )
125+ {
126+ // set a the Error message to the output to infer that the transaction will never succeed.
127+ var error = "The transaction is already expired, and it will never succeed." ;
128+ output . Error = TransactionErrorResolver . TakeErrorMessage ( error , _webAppOptions . IsDebugMode ) ;
129+ return output ;
130+ }
122131 return output ;
123-
124132 }
125133
126134 /// <summary>
You can’t perform that action at this time.
0 commit comments