Mono-hop unidirectional payments#2
Conversation
|
Please:
|
|
Also comment out this line in ci.yml:
|
b24eaca to
a878176
Compare
f43bd8c to
4617a02
Compare
4617a02 to
1353d6b
Compare
|
I guess you can merge the commits here (except for the ones being proposed to Joe or the hacky one) |
|
merge->squash |
|
@canndrew i've updated the tip of this repo's master to sync with Joe's, you can rebase |
c42e57d to
0e90ded
Compare
|
|
||
| module UpdateMonoHopUnidirectionalPaymentWithContext = | ||
| let internal checkWeHaveSufficientFunds (state: Commitments) (currentSpec) = | ||
| let fees = if (state.LocalParams.IsFunder) then (Transactions.commitTxFee (state.RemoteParams.DustLimitSatoshis) currentSpec) else Money.Zero |
There was a problem hiding this comment.
please split this long line in the same way we do in geewallet:
let foo =
if bar then
baz
else
bazz
There was a problem hiding this comment.
(also no need for so many parenthesis)
a0dba66 to
0e90ded
Compare
0e90ded to
06726a3
Compare
ok then separate that one but let's not delay this so much |
6f88df3 to
7f242df
Compare
d1edb32 to
7ab6e5c
Compare
504ba35 to
d0e55cb
Compare
1d27824 to
698ea77
Compare
|
@canndrew pls rebase when u have time |
698ea77 to
7fc86f6
Compare
| cd $GITHUB_WORKSPACE/src/DotNetLightning.Core | ||
| dotnet pack . -p:Configuration=Release --version-suffix date`date +%Y%m%d-%H%M`-git-`echo $GITHUB_SHA | cut -c 1-7`-${{ matrix.RID }} | ||
| dotnet nuget push ./bin/Release/DotNetLightning.Core.1*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json No newline at end of file | ||
| dotnet nuget push ./bin/Release/DotNetLightning.Kiss.1*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json |
There was a problem hiding this comment.
this looks wrong, we should push BouncyCastle binaries, not native
There was a problem hiding this comment.
Oops. I've fixed it so that we only upload the BouncyCastle build and we upload it as DotNetLightning.Kiss
| let totalBalance = reduced.ToRemote | ||
| let untrimmedSpendableBalance = totalBalance - channelReserve - fees | ||
| let htlcSuccessFee = | ||
| reduced.FeeRatePerKw.ToFee(Transactions.Constants.HTLC_SUCCESS_WEIGHT) |
There was a problem hiding this comment.
why do we use any HTLC-related stuff here if we don't use HTLCs?
There was a problem hiding this comment.
Because I had to think hard about how exactly this function needs to be implemented and I didn't want to have to do that again, or to have the code silently break, when we eventually add support for HTLCs. So I just made it HTLC-compatible to begin with.
There was a problem hiding this comment.
that's great but I'd prefer if you move this code into another PR, to pick it up later
There was a problem hiding this comment.
I've removed the HTLC fees from the calculation and created a seperate PR which adds them back here: #3
| static member Zero = | ||
| let b: bool array = [||] | ||
| b |> BitArray |> FeatureBit | ||
| static member Zero = FeatureBit() |
There was a problem hiding this comment.
is this change really needed for this PR?
d054b8b to
3a59364
Compare
| Errors: string list | ||
| } | ||
| with | ||
| static member Create msg e = { |
There was a problem hiding this comment.
hey let's remove this Create method, as the record can be instantiated easily anyway without it
There was a problem hiding this comment.
I can do. All the other invalid msg types have it though, though they all seem equally pointless. Is it important to be consistent here?
There was a problem hiding this comment.
good point; let's remove it here and I'll prepare a PR to remove them upstream
3a59364 to
e8beb8e
Compare
e8beb8e to
bbc27ea
Compare
This is a work-in-progress PR for monodirectional, unihop (non-htlc) payments.