-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
staking: check caller is the channel proxy when settling #203
staking: check caller is the channel proxy when settling #203
Conversation
Most of the changes in disputes.js seems to be prettier. |
c309d50
to
f2140ad
Compare
fa80fb3
to
9e815dc
Compare
Rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small change requested, can be merged either way
|
||
// Receive funds from the channel multisig | ||
// We use channelID to find the indexer owner of the channel | ||
require(isChannel(_channelID), "Channel: does not exist"); | ||
require(isChannel(channelID), "Channel: does not exist"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be moved above the deletion of channelsProxy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do and push the changes
* staking: advertise, in the AllocationCreated event, the non-binding price charged for queries related to an allocation * staking: check caller is the channel proxy when settling (#203)
Issue:
The
settle()
function needs to be public so the multisig can call it.It means that it can be called by any party, and as the
channelID
is also public (advertised in allocate()) you could be settling a channel for someone else.Changes:
settle()
that the caller is a channel proxy.channelID
from settle() and instead use the caller (proxy address) to find the allocation.Changes required in agents:
allocate()
. Connext will provide a helper function to do this.