Files
specification/protocol/network/messages/reject.md
T

31 lines
1.9 KiB
Markdown
Raw Normal View History

2020-02-06 12:37:37 -05:00
<div class="cwikmeta">{
"title":"REJECT",
"related":["/protocol"]
}</div>
2020-11-04 13:23:02 -05:00
*Notifies peer that a message is invalid*
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
| [compact int](/protocol/p2p/compact__int.md) N (max 12) | N bytes | 1 byte | [compact int](/protocol/p2p/compact__int.md) M (max 111) | M bytes |
|----------------|---------|-------------|---------------|---------|
| command length | command | error code | reason length | reason string |
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
*command length* and *command* form a [vector](/protocol/p2p/vector.md) of bytes that identify the type of the problem message. These bytes (less padded nulls) match the *command* field in the protocol [message envelope](/protocol.md).
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
*reason length* and *reason string* form a [vector](/protocol/p2p/vector.md) of bytes that is a string providing a human language explanation of the reason the message was rejected. This string is subject to change so client software **SHOULD NOT** use it programatically.
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
*error code* provides a succinct machine-interpretable reason why the message was rejected.
2020-02-06 12:37:37 -05:00
2020-11-04 13:23:02 -05:00
### Reject Error Codes
| Name | Value | Response To | Description
2020-02-06 12:37:37 -05:00
|-------------|-------|---------------|-----------|
2020-11-04 13:23:02 -05:00
| REJECT_MALFORMED | 0x01 | any | message cannot be deserialized |
| REJECT_INVALID | 0x10 | BLOCK, TX, FILTERSIZEXTHIN | block or transaction is invalid, or xthin filter size is too small |
2020-02-06 12:37:37 -05:00
| REJECT_OBSOLETE | 0x11 | VERSION | This node no longer supports your client protocol version |
| REJECT_DUPLICATE | 0x12 | unused | |
2020-11-04 13:23:02 -05:00
| REJECT_NONSTANDARD | 0x40 | TX | Transaction is [non-standard](/standard__transactions.md), or [not final](/final__transactions.md) as per BIP68 |
| REJECT_DUST | 0x41 | TX | Transaction has an output that is too small |
| REJECT_INSUFFICIENTFEE | 0x42 | TX | Transaction does not pay enough to be relayed |
| REJECT_CHECKPOINT | 0x43 | unused | |
| REJECT_WAITING | 0x44 | TX | This transaction is [not final](/final__transactions.md) |