• Joshua Gutow's avatar
    op-service: Fix txmgr test · 0e52218c
    Joshua Gutow authored
    The context in txmgr.Send is now being checked for cancellations by the
    retry package which wraps craftTx. This caused an error in one of the
    txmgr queue tests. The flow of the test is that it would send a valid tx,
    send an invalid tx, and then send another tx. It'd expect that the last
    tx got cancelled because of the context cancellation propogation (i.e. if
    one tx in the queue fails, all will fail).
    
    Because the context is cancelled prior to the call to txmgr.Send & this
    check on the context, the transaction is no longer failing in the receipt
    loop, but at craftTx. This test checked that the transaction would make it
    to the receipt loop (via hooking into sendTx where it recorded the nonce).
    0e52218c
queue_test.go 6.16 KB