Skip to content

Commit 7638706

Browse files
committed
chore: document all nack codes
1 parent 545f61b commit 7638706

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

stackslib/src/net/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,14 +1021,23 @@ pub struct NackData {
10211021
pub error_code: u32,
10221022
}
10231023
pub mod NackErrorCodes {
1024+
/// A handshake has not yet been completed with the requester
10241025
pub const HandshakeRequired: u32 = 1;
1026+
/// The request depends on a burnchain block that this peer does not recognize
10251027
pub const NoSuchBurnchainBlock: u32 = 2;
1028+
/// The remote peer has exceeded local per-peer bandwidth limits
10261029
pub const Throttled: u32 = 3;
1030+
/// The request depends on a PoX fork that this peer does not recognize as canonical
10271031
pub const InvalidPoxFork: u32 = 4;
1032+
/// The message received is not appropriate for the ongoing step in the protocol being executed
10281033
pub const InvalidMessage: u32 = 5;
1034+
/// The StackerDB requested is not known to this node
10291035
pub const NoSuchDB: u32 = 6;
1036+
/// The StackerDB chunk request referred to an older copy of the chunk than this node has
10301037
pub const StaleVersion: u32 = 7;
1038+
/// The remote peer's view of the burnchain is too out-of-date for the protocol to continue
10311039
pub const StaleView: u32 = 8;
1040+
/// The StackerDB chunk request referred to a newer copy of the chunk that this node has
10321041
pub const FutureVersion: u32 = 9;
10331042
}
10341043

0 commit comments

Comments
 (0)