added admin functionality #7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "admin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
457456fbe5
to6489cc95c7
@ -204,0 +214,4 @@
// admin commands
rpc Airdrop (AirdropReq) returns (Empty);
rpc ListAllContracts (Empty) returns (stream Contract);
rpc ListAccounts (Empty) returns (stream ListAccountsResp);
maybe we can call this message similarly to the previous,
returns (stream Contract);
So instead of calling it
ListAccountsResp
, maybe call itAccount
?yeah, it that would work
@ -17,1 +17,4 @@
const ADMIN_ACCOUNTS: &[&str] = &[
"x52w7jARC5erhWWK65VZmjdGXzBK6ZDgfv1A283d8XK",
"ThisIsNotARealWallet000000000000000000000000",
not sure this wallet will actually be able to sign stuff 😆
Yes. I will need your address instead, so that you can give airdrops.
@ -273,0 +307,4 @@
) -> Result<Response<Self::ListAccountsStream>, Status> {
check_admin_key(&req)?;
let _ = check_sig_from_req(req)?;
let accounts = self.data.list_accounts();
did you consider to clone the data arc instead and pass it to the thread?
I don't know what you mean.
I think this operation will clone a full list of accounts, so I was thinking to just clone arc if the map of accounts is multithreaded
Very good point, thank you! It's the same case for the contracts. I believe I can just pass the channel instead, so that each contract/account gets clone individually, instead of cloning the full list at once. Will submit a commit later today.
6489cc95c7
to0638590e16
0638590e16
to64f892c174