check-bolt: check that comments in code match the specs.

And fix the mistakes!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-05-02 15:58:56 +09:30
parent 7bfbee136e
commit 03a538ca02
8 changed files with 261 additions and 10 deletions

View File

@@ -8,10 +8,9 @@ uint64_t fee_by_feerate(size_t txsize, uint32_t fee_rate)
{
/* BOLT #2:
*
* The fee for a commitment transaction MUST be calculated by
* the multiplying this bytescount by the fee rate, dividing
* by 1000 and truncating (rounding down) the result to an
* even number of satoshis.
* The fee for a transaction MUST be calculated by multiplying this
* bytecount by the fee rate, dividing by 1000 and truncating
* (rounding down) the result to an even number of satoshis.
*/
return txsize * fee_rate / 2000 * 2;
}