Skip to content
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

Add UpdateMixnodeConfigOnBehalf to vestng contract #1091

Merged
merged 2 commits into from
Feb 11, 2022

Conversation

durch
Copy link
Contributor

@durch durch commented Feb 1, 2022

No description provided.

@tommyv1987
Copy link
Contributor

Happy with this.
Steps to test:
Migrate both vesting and mixnet contracts.
Have an existing account with a node bonded and perform the following:

 let mut rng = rand::thread_rng();
        let profit_percent: u8 = rng.gen_range(1..100);

        let response = client.vesting_update_mixnode_config(profit_percent)
            .await
            .unwrap();

        println!("{:?}", response);

Then, get the account details and the mixnode profit percentage should be updated with the value set above:

Some(MixNodeBond { pledge_amount: Coin { denom: "unymt", amount: Uint128(100000000) }, total_delegation: Coin { denom: "unymt", amount: Uint128(0) }, owner: Addr("address"), layer: One, block_height: 442421, mix_node: MixNode { host: "1.1.1.1", mix_port: 1789, verloc_port: 1790, http_api_port: 8000, sphinx_key: "key", identity_key: "key", version: "0.12.1", profit_margin_percent: 99 }, proxy: Some(Addr("address")) })

@jstuczyn
Copy link
Contributor

jstuczyn commented Feb 2, 2022

Should we perhaps futureproof ourselves a bit and make it take Option and Option to let you update both?

@durch
Copy link
Contributor Author

durch commented Feb 11, 2022

Should we perhaps futureproof ourselves a bit and make it take Option and Option to let you update both?

I'll merge it like this for now, its been dangling a while

@durch durch merged commit 938eb2d into develop Feb 11, 2022
@durch durch deleted the feature/vesting-update-mixnode-config branch February 11, 2022 11:15
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.

4 participants