Skip to content

Commit f68f6bd

Browse files
authored
no need to validate current block height (#610)
1 parent 9418243 commit f68f6bd

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

common/transaction/sendMoney.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ Escrow Part
292292
func (tx *SendMoney) EscrowValidate(dbTx bool) error {
293293
var (
294294
accountBalance model.AccountBalance
295-
block *model.Block
296295
err error
297296
row *sql.Row
298297
)
@@ -310,14 +309,6 @@ func (tx *SendMoney) EscrowValidate(dbTx bool) error {
310309
return blocker.NewBlocker(blocker.ValidationErr, "RecipientAddressRequired")
311310
}
312311

313-
block, err = util.GetLastBlock(tx.QueryExecutor, tx.BlockQuery)
314-
if err != nil {
315-
return blocker.NewBlocker(blocker.ValidationErr, err.Error())
316-
}
317-
if uint64(block.GetHeight()) >= tx.Escrow.GetTimeout() {
318-
return blocker.NewBlocker(blocker.ValidationErr, "TransactionExpired")
319-
}
320-
321312
// todo: this is temporary solution, later we should depend on coinbase, so no genesis transaction exclusion in
322313
// validation needed
323314
if tx.SenderAddress != constant.MainchainGenesisAccountAddress {

0 commit comments

Comments
 (0)