fn make_neuron(
    address: &str,
    investor_type: &str,
    stake_e8s: u64,
    dissolve_delay_seconds: u64,
    aging_since_timestamp_seconds: u64,
) -> Neuron {
    let subaccount = {
        let mut state = Sha256::new();
        state.write(b"gtc-neuron");
        state.write(address.as_bytes());
        state.write(investor_type.as_bytes());
        state.write(&dissolve_delay_seconds.to_be_bytes());
        state.finish()
    };

    Neuron {
        id: Some(NeuronId::from_subaccount(&subaccount)),
        account: subaccount.to_vec(),
        controller: Some(GENESIS_TOKEN_CANISTER_ID.get()),
        cached_neuron_stake_e8s: stake_e8s,
        dissolve_state: Some(DissolveState::DissolveDelaySeconds(dissolve_delay_seconds)),
        aging_since_timestamp_seconds,
        ..Default::default()
    }
}
/// Make a neuron with the fields that can be set initially, with the
/// expectation that the Governance canister will fill-in additional fields
/// (e.g. `created_timestamp_seconds`) when the neuron is claimed by the
/// associated GTC account owner in the future.
///
/// Arguments:
///
/// * `controller`: The controller of the to-be-created neuron
/// * `investor_type`: Either "sr" or "ect"
/// * `stake_e8s`: The stake (in "e8s") of the to-be-created neuron
/// * `dissolve_delay_seconds`: The dissolve delay of the to-be-created neuron
Make a neuron with the fields that can be set initially, with the
expectation that the Governance canister will fill-in additional fields
when the neuron is claimed by the
associated GTC account owner in the future.




Make a neuron with the fields that can be set initially with the expectation that the Governance canister will fill - in additional fields when the neuron is claimed by the associated GTC account owner in the future .
fn make_neuron(
    address: &str,
    investor_type: &str,
    stake_e8s: u64,
    dissolve_delay_seconds: u64,
    aging_since_timestamp_seconds: u64,
) -> Neuron {
    let subaccount = {
        let mut state = Sha256::new();
        state.write(b"gtc-neuron");
        state.write(address.as_bytes());
        state.write(investor_type.as_bytes());
        state.write(&dissolve_delay_seconds.to_be_bytes());
        state.finish()
    };
    Neuron {
        id: Some(NeuronId::from_subaccount(&subaccount)),
        account: subaccount.to_vec(),
        controller: Some(GENESIS_TOKEN_CANISTER_ID.get()),
        cached_neuron_stake_e8s: stake_e8s,
        dissolve_state: Some(DissolveState::DissolveDelaySeconds(dissolve_delay_seconds)),
        aging_since_timestamp_seconds,
        ..Default::default()
    }
}
fn make_neuron ( address : & str , investor_type : & str , stake_e8s : u64 , dissolve_delay_seconds : u64 , aging_since_timestamp_seconds : u64 , ) -> Neuron { let subaccount = { let mut state = Sha256 :: new ( ) ; state . write ( b" " ) ; state . write ( address . as_bytes ( ) ) ; state . write ( investor_type . as_bytes ( ) ) ; state . write ( & dissolve_delay_seconds . to_be_bytes ( ) ) ; state . finish ( ) } ; Neuron { id : Some ( NeuronId :: from_subaccount ( & subaccount ) ) , account : subaccount . to_vec ( ) , controller : Some ( GENESIS_TOKEN_CANISTER_ID . get ( ) ) , cached_neuron_stake_e8s : stake_e8s , dissolve_state : Some ( DissolveState :: DissolveDelaySeconds ( dissolve_delay_seconds ) ) , aging_since_timestamp_seconds , .. Default :: default ( ) } }
Make a neuron with the fields that can be set initially, with the
expectation that the Governance canister will fill-in additional fields
(e.g.
Make a neuron with the fields that can be set initially with the expectation that the Governance canister will fill - in additional fields ( e . g .
address
&str
investor_type
&str
stake_e8s
u64
dissolve_delay_seconds
u64
aging_since_timestamp_seconds
u64
address
&str
investor_type
&str
stake_e8s
u64
dissolve_delay_seconds
u64
aging_since_timestamp_seconds
u64