check dust limits
* on channel opening we verify that the peer's dust limit is above 354 sat, the limit for unknown segwit versions * we constrain the allowed scriptpubkey types for channel closing * we check that the remote's output is above the relay dust limit for the collaborative close case
This commit is contained in:
@@ -349,8 +349,12 @@ def relayfee(network: 'Network' = None) -> int:
|
||||
|
||||
|
||||
# see https://github.com/bitcoin/bitcoin/blob/a62f0ed64f8bbbdfe6467ac5ce92ef5b5222d1bd/src/policy/policy.cpp#L14
|
||||
DUST_LIMIT_DEFAULT_SAT_LEGACY = 546
|
||||
DUST_LIMIT_DEFAULT_SAT_SEGWIT = 294
|
||||
# and https://github.com/lightningnetwork/lightning-rfc/blob/7e3dce42cbe4fa4592320db6a4e06c26bb99122b/03-transactions.md#dust-limits
|
||||
DUST_LIMIT_P2PKH = 546
|
||||
DUST_LIMIT_P2SH = 540
|
||||
DUST_LIMIT_UNKNOWN_SEGWIT = 354
|
||||
DUST_LIMIT_P2WSH = 330
|
||||
DUST_LIMIT_P2WPKH = 294
|
||||
|
||||
|
||||
def dust_threshold(network: 'Network' = None) -> int:
|
||||
|
||||
Reference in New Issue
Block a user