Skip to content

Commit

Permalink
revert: remove checktx timeout as it needs more careful error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Jan 15, 2024
1 parent 23cb8c6 commit c39ef2c
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions internal/mempool/p2p_msg_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ import (
"github.com/dashpay/tenderdash/types"
)

const (
// max time to wait for a response from CheckTx
p2pCheckTxTimeout = 5 * time.Second
)

type (
mempoolP2PMessageHandler struct {
logger log.Logger
Expand Down Expand Up @@ -63,9 +58,6 @@ func (h *mempoolP2PMessageHandler) Handle(ctx context.Context, _ *client.Client,
known := 0
failed := 0
for _, tx := range protoTxs {
// TODO: Move to abciclient, define configuration settings
ctx, cancel := context.WithTimeout(ctx, p2pCheckTxTimeout)
defer cancel()
if err := h.checker.CheckTx(ctx, tx, nil, txInfo); err != nil {
if errors.Is(err, types.ErrTxInCache) {
// if the tx is in the cache,
Expand Down

0 comments on commit c39ef2c

Please sign in to comment.