Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
lightning-bits
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
lightning-bits
Commits
8cc1d96f
Commit
8cc1d96f
authored
Sep 19, 2019
by
Tankred Hase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set targetConf on coop channel close
parent
cfc4b7c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
channel.js
src/action/channel.js
+2
-0
channel.spec.js
test/unit/action/channel.spec.js
+2
-0
No files found.
src/action/channel.js
View file @
8cc1d96f
...
...
@@ -3,6 +3,7 @@
* call the corresponding GRPC apis for channel management.
*/
import
{
MED_TARGET_CONF
}
from
'../config'
;
import
{
toSatoshis
,
poll
,
getTimeTilAvailable
}
from
'../helper'
;
import
*
as
log
from
'./log'
;
...
...
@@ -316,6 +317,7 @@ class ChannelAction {
const
stream
=
this
.
_grpc
.
sendStreamCommand
(
'closeChannel'
,
{
channelPoint
:
this
.
_parseChannelPoint
(
channelPoint
),
force
,
targetConf
:
force
?
undefined
:
MED_TARGET_CONF
,
});
await
new
Promise
((
resolve
,
reject
)
=>
{
stream
.
on
(
'data'
,
data
=>
{
...
...
test/unit/action/channel.spec.js
View file @
8cc1d96f
...
...
@@ -356,6 +356,7 @@ describe('Action Channels Unit Tests', () => {
.
withArgs
(
'closeChannel'
,
{
channelPoint
:
{
fundingTxidStr
:
'FFFF'
,
outputIndex
:
1
},
force
:
false
,
targetConf
:
16
,
})
.
returns
({
on
:
onStub
});
await
channel
.
closeChannel
({
channelPoint
});
...
...
@@ -371,6 +372,7 @@ describe('Action Channels Unit Tests', () => {
.
withArgs
(
'closeChannel'
,
{
channelPoint
:
{
fundingTxidStr
:
'FFFF'
,
outputIndex
:
1
},
force
:
true
,
targetConf
:
undefined
,
})
.
returns
({
on
:
onStub
});
await
channel
.
closeChannel
({
channelPoint
,
force
:
true
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment