Skip to content

Rebalancing#4

Open
karuan wants to merge 5 commits into
masterfrom
rebalancing
Open

Rebalancing#4
karuan wants to merge 5 commits into
masterfrom
rebalancing

Conversation

@karuan

@karuan karuan commented Mar 12, 2019

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread global.h Outdated
Comment thread hostNodeBase.cc Outdated
Comment thread hostNodeBase.cc Outdated
Comment thread hostNodeBase.cc
Comment thread routerNode.cc Outdated
double oldBalance = nodeToPaymentChannel[key].balance;
simtime_t zeroStartTime = nodeToPaymentChannel[key].zeroStartTime;

if ( ( oldBalance == 0 ) && ( zeroStartTime >= 0) && ( zeroStartTime + _rebalanceTimeReq <= simTime()) )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: can you change this to simTime > zeroStartTime + _rebalanceTimeReq? (more intuitive that way, but not a big deal)

Comment thread routerNode.cc Outdated
Comment thread hostNodeBase.cc Outdated
double oldBalance = nodeToPaymentChannel[key].balance;
simtime_t zeroStartTime = nodeToPaymentChannel[key].zeroStartTime;

if ( ( oldBalance == 0 ) && ( zeroStartTime >= 0) && ( zeroStartTime + _rebalanceTimeReq <= simTime()) )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: can you change this to simTime > zeroStartTime + _rebalanceTimeReq? (more intuitive that way, but not a big deal)

Comment thread hostNodeBase.cc Outdated

@vibhaa vibhaa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One major bug - balance should be added proportional to total capacity not current balance. Others are minor. Can you please fix as early as possible? Thanks!

Comment thread hostNodeBase.cc Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants