forked from stratisproject/StratisBitcoinFullNode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request stratisproject#262 from fassadlr/channelnetwork
[Channels] Subclass Network and create FeeNetwork / ChannelNetwork
- Loading branch information
Showing
20 changed files
with
87 additions
and
1,288 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace NBitcoin | ||
{ | ||
public class FeeNetwork : Network | ||
{ | ||
/// <summary> | ||
/// Mininum fee rate for all transactions. | ||
/// Fees smaller than this are considered zero fee for transaction creation. | ||
/// Be careful setting this: if you set it to zero then a transaction spammer can cheaply fill blocks using | ||
/// 1-satoshi-fee transactions. It should be set above the real cost to you of processing a transaction. | ||
/// </summary> | ||
/// <remarks> | ||
/// The <see cref="MinRelayTxFee"/> and <see cref="MinTxFee"/> are typically the same value to prevent dos attacks on the network. | ||
/// If <see cref="MinRelayTxFee"/> is less than <see cref="MinTxFee"/>, an attacker can broadcast a lot of transactions with fees between these two values, | ||
/// which will lead to transactions filling the mempool without ever being mined. | ||
/// </remarks> | ||
public long MinTxFee { get; protected set; } | ||
|
||
/// <summary> | ||
/// A fee rate that will be used when fee estimation has insufficient data. | ||
/// </summary> | ||
public long FallbackFee { get; protected set; } | ||
|
||
/// <summary> | ||
/// The minimum fee under which transactions may be rejected from being relayed. | ||
/// </summary> | ||
/// <remarks> | ||
/// The <see cref="MinRelayTxFee"/> and <see cref="MinTxFee"/> are typically the same value to prevent dos attacks on the network. | ||
/// If <see cref="MinRelayTxFee"/> is less than <see cref="MinTxFee"/>, an attacker can broadcast a lot of transactions with fees between these two values, | ||
/// which will lead to transactions filling the mempool without ever being mined. | ||
/// </remarks> | ||
public long MinRelayTxFee { get; protected set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.