funding: adjust_fee() to allow fee alterations.

This is used for figuring out the close transaction balances,
but can also be used in the future for dynamic fee support.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-01-22 06:41:47 +10:30
parent d5c30ee30b
commit cc1b1d7de7
2 changed files with 60 additions and 11 deletions

View File

@@ -61,6 +61,20 @@ bool funding_delta(bool a_is_funder,
struct channel_oneside *a_side,
struct channel_oneside *b_side);
/**
* adjust_fee: Change fee.
* @a_is_funder: is A paying for the anchor?
* @anchor_satoshis: The anchor amount.
* @fee_satoshis: The new fee amount.
* @a_side: channel a's state to update.
* @b_side: channel b's state to update.
*/
bool adjust_fee(bool a_is_funder,
uint64_t anchor_satoshis,
uint64_t fee_satoshis,
struct channel_oneside *a_side,
struct channel_oneside *b_side);
/**
* commit_fee: Fee amount for commit tx.
* @a_satoshis: A's openchannel->commitment_fee offer