Skip to content

Conversation

@Wutche
Copy link

@Wutche Wutche commented Jan 4, 2026

Description

Adds the missing ConflictingNonceInMempool error type to the TxRejectedReason enum and the corresponding ConflictingNonceInMempoolRejection type to TxBroadcastResultRejected.

This error can be returned by Stacks nodes when broadcasting a transaction that has a conflicting nonce with another transaction already in the mempool.

Changes:

  • Added ConflictingNonceInMempool to TxRejectedReason enum in constants.ts
  • Added ConflictingNonceInMempoolRejection type in types.ts
  • Added the new type to TxBroadcastResultRejected union

Closes #1801

Breaking change?

None - this is purely additive.

@janniks @zone117x

Example

import { TxRejectedReason, ConflictingNonceInMempoolRejection } from '@stacks/transactions';

// Now developers can properly handle this rejection type
if (result.reason === TxRejectedReason.ConflictingNonceInMempool) {
  console.log(`Nonce conflict: expected ${result.reason_data.expected}, got ${result.reason_data.actual}`);
}

Checklist


export type ConflictingNonceInMempoolRejection = {
reason: 'ConflictingNonceInMempool';
reason_data: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@friedger still waiting for your review

…enum

Adds the missing ConflictingNonceInMempool error type that can be returned
when broadcasting a transaction with a conflicting nonce in the mempool.
Closes stx-labs#1801
@Wutche Wutche force-pushed the fix/1801-add-conflicting-nonce-in-mempool branch from 75438a7 to ce03642 Compare January 5, 2026 17:00
@Wutche Wutche requested a review from friedger January 5, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConflictingNonceInMempool is missing in the broadcast error enum

2 participants