few minor fixes to comments
This commit is contained in:
parent
2629a4c5bc
commit
6d19fd0d57
|
@ -559,11 +559,12 @@ contract LiquidPledging is LiquidPledgingBase {
|
|||
callPlugins(false, from, to, amount);
|
||||
}
|
||||
|
||||
/// @notice `normalizePledge` does 2 things:
|
||||
/// #1: Checks to make sure that the pledges are correct. Then if
|
||||
/// a pledged project has already been committed, it changes
|
||||
/// the owner to be the proposed project (The UI
|
||||
/// will have to read the commit time and manually do what
|
||||
/// @notice `normalizePledge` only affects pledges with the Pledged PaymentState
|
||||
/// and does 2 things:
|
||||
/// #1: Checks if the pledge should be committed. This means that
|
||||
/// if the pledge has an intendedProject and it is past the
|
||||
/// commitTime, it changes the owner to be the proposed project
|
||||
/// (The UI will have to read the commit time and manually do what
|
||||
/// this function does to the pledge for the end user
|
||||
/// at the expiration of the commitTime)
|
||||
///
|
||||
|
|
|
@ -463,14 +463,14 @@ contract LiquidPledgingBase is Owned {
|
|||
/// @notice A getter that searches the delegationChain for the level of
|
||||
/// authority a specific delegate has within a Pledge
|
||||
/// @param n The Pledge that will be searched
|
||||
/// @param idxDelegate The specified delegate that's searched for
|
||||
/// @param idDelegate The specified delegate that's searched for
|
||||
/// @return If the delegate chain contains the delegate with the
|
||||
/// `admins` array index `idxDelegae` this returns that delegates
|
||||
/// `admins` array index `idDelegate` this returns that delegates
|
||||
/// corresponding index in the delegationChain. Otherwise it returns
|
||||
/// the maximum address.
|
||||
function getDelegateId(Pledge n, uint64 idxDelegate) internal returns(uint64) {
|
||||
for (uint i=0; i<n.delegationChain.length; i++) {
|
||||
if (n.delegationChain[i] == idxDelegate) return uint64(i);
|
||||
/// the NOTFOUND constant
|
||||
function getDelegateIdx(Pledge n, uint64 idDelegate) internal returns(uint64) {
|
||||
for (uint i=0; i < n.delegationChain.length; i++) {
|
||||
if (n.delegationChain[i] == idDelegate) return uint64(i);
|
||||
}
|
||||
return NOTFOUND;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue