Skip to content

Commit 907ef99

Browse files
committed
log
1 parent a30110f commit 907ef99

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

chains/txmgr/broadcaster.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ func (eb *Broadcaster[CID, HEAD, ADDR, THASH, BHASH, SEQ, FEE]) handleUnstartedT
407407
return fmt.Errorf("invariant violation: expected transaction %v to be unstarted, it was %s", etx.ID, etx.State), false
408408
}
409409

410+
eb.lggr.Infow("DEBUG handleUnstartedTx loaded from DB",
411+
"txID", etx.ID,
412+
"maxGasPrice", etx.MaxGasPrice,
413+
"maxGasPriceIsNil", etx.MaxGasPrice == nil)
414+
410415
attempt, _, _, retryable, err := eb.NewTxAttempt(ctx, *etx, eb.lggr)
411416
// Mark transaction as fatal if provided gas limit is set too low
412417
if errors.Is(err, fees.ErrFeeLimitTooLow) {

chains/txmgr/txmgr.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,11 @@ func (b *Txm[CID, HEAD, ADDR, THASH, BHASH, R, SEQ, FEE]) Trigger(addr ADDR) {
538538

539539
// CreateTransaction inserts a new transaction
540540
func (b *Txm[CID, HEAD, ADDR, THASH, BHASH, R, SEQ, FEE]) CreateTransaction(ctx context.Context, txRequest txmgrtypes.TxRequest[ADDR, THASH]) (tx txmgrtypes.Tx[CID, ADDR, THASH, BHASH, SEQ, FEE], err error) {
541+
b.logger.Infow("DEBUG CreateTransaction entry",
542+
"txRequest.MaxGasPrice", txRequest.MaxGasPrice,
543+
"maxGasPriceIsNil", txRequest.MaxGasPrice == nil,
544+
"idempotencyKey", txRequest.IdempotencyKey)
545+
541546
// Check for existing Tx with IdempotencyKey. If found, return the Tx and do nothing
542547
// Skipping CreateTransaction to avoid double send
543548
if b.txmv2wrapper != nil && txRequest.Meta != nil && txRequest.Meta.DualBroadcast != nil && *txRequest.Meta.DualBroadcast {
@@ -903,10 +908,20 @@ func (b *Txm[CID, HEAD, ADDR, THASH, BHASH, R, SEQ, FEE]) pruneQueueAndCreateTxn
903908
)
904909
}
905910

911+
b.logger.Infow("DEBUG pruneQueueAndCreateTxn BEFORE CreateTransaction",
912+
"txRequest.MaxGasPrice", txRequest.MaxGasPrice,
913+
"maxGasPriceIsNil", txRequest.MaxGasPrice == nil)
914+
906915
tx, err = b.txStore.CreateTransaction(ctx, txRequest, chainID)
907916
if err != nil {
908917
return tx, err
909918
}
919+
920+
b.logger.Infow("DEBUG pruneQueueAndCreateTxn AFTER CreateTransaction",
921+
"tx.ID", tx.ID,
922+
"tx.MaxGasPrice", tx.MaxGasPrice,
923+
"maxGasPriceIsNil", tx.MaxGasPrice == nil)
924+
910925
b.logger.Debugw("Created transaction",
911926
"fromAddress", txRequest.FromAddress,
912927
"toAddress", txRequest.ToAddress,

0 commit comments

Comments
 (0)