-
Notifications
You must be signed in to change notification settings - Fork 160
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
feat(rpc): implement Filecoin.MsigGetVested and Filecoin.MsigGetVestingSchedule #4304
Conversation
src/rpc/methods/msig.rs
Outdated
let msig_vesting = match &ms { | ||
multisig::State::V8(st) => MsigVesting { | ||
initial_balance: st.initial_balance.atto().clone(), | ||
start_epoch: st.start_epoch, | ||
unlock_duration: st.unlock_duration, | ||
}, | ||
multisig::State::V9(st) => MsigVesting { | ||
initial_balance: st.initial_balance.atto().clone(), | ||
start_epoch: st.start_epoch, | ||
unlock_duration: st.unlock_duration, | ||
}, | ||
multisig::State::V10(st) => MsigVesting { | ||
initial_balance: st.initial_balance.atto().clone(), | ||
start_epoch: st.start_epoch, | ||
unlock_duration: st.unlock_duration, | ||
}, | ||
multisig::State::V11(st) => MsigVesting { | ||
initial_balance: st.initial_balance.atto().clone(), | ||
start_epoch: st.start_epoch, | ||
unlock_duration: st.unlock_duration, | ||
}, | ||
multisig::State::V12(st) => MsigVesting { | ||
initial_balance: st.initial_balance.atto().clone(), | ||
start_epoch: st.start_epoch, | ||
unlock_duration: st.unlock_duration, | ||
}, | ||
multisig::State::V13(st) => MsigVesting { | ||
initial_balance: st.initial_balance.atto().clone(), | ||
start_epoch: st.start_epoch, | ||
unlock_duration: st.unlock_duration, | ||
}, | ||
}; |
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.
Is this a good place for this? @hanabi1224 implemented it src/shim/actors/market/balance_table.rs
, which allows re-usability.
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.
As far as I remember we usually have this state matching code in fil-actor-states
, I guess we should either keep it that way or move all of that logic out to shim
. It's much better to have all the similar logic in predictable places, otherwise it's hard to navigate.
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.
Ah, we have a custom struct here. Then perhaps it belongs to forest
.
The stuff I was talking about before:
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.
moved inside src/shim/actors/multisig
Summary of changes
Changes introduced in this pull request:
Filecoin.MsigGetVested
andFilecoin.MsigGetVestingSchedule
RPC methodFilecoin.MsigGetAvailableBalance
andFilecoin.MsigGetPending
(10) fromstate.rs
tomsig.rs
Reference issue to close (if applicable)
contributes to #4164
Other information and links
Change checklist