Skip to content

Commit

Permalink
Fixed ban of nodes with duplicate of transaction errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dchertkov committed Jul 24, 2018
1 parent da9a2a4 commit 2d41559
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/block/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func (b *Block) Check() error {
}

if err := t.Check(b.Header.Time, false); err != nil {
return utils.ErrInfo(err)
return err
}

}
Expand Down
2 changes: 1 addition & 1 deletion packages/daemons/blocks_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ func processBlocks(blocks []*block.Block) error {

if err := b.Check(); err != nil {
dbTransaction.Rollback()
return utils.ErrInfo(err)
return err
}

if err := b.Play(dbTransaction); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion packages/transaction/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func CheckTransaction(data []byte) (*tx.Header, error) {
func (t *Transaction) Check(checkTime int64, checkForDupTr bool) error {
err := CheckLogTx(t.TxFullData, checkForDupTr, false)
if err != nil {
return utils.ErrInfo(err)
return err
}
logger := log.WithFields(log.Fields{"tx_time": t.TxTime})
// time in the transaction cannot be more than MAX_TX_FORW seconds of block time
Expand Down

0 comments on commit 2d41559

Please sign in to comment.