kowala-tech / kcoin

A stable cryptocurrency that algorithmically targets $1 USD using the Kowala Protocol
https://www.kowala.tech/
Other
18 stars 16 forks source link

validator.start() method is missing; no way to set deposit #769

Open johnreitano opened 5 years ago

johnreitano commented 5 years ago

Type:

Issue

What happened? / What do you need?:

Ran validator.setDeposit(...) as in https://docs.kowala.tech/getting-started/consensus/

If it's a request, what do you need it for?:

To let our exchange partner GMM run mining on testnet.

If it's an issue, how can we reproduce it?:

run validator.setDeposit(validator.getMinimumDeposit())

Affected servers or services:

Priority:

Medium

(Please be aware that your priority may not match ours, we'll use this as guidance only).

Other info we may need:

rgeraldes commented 5 years ago

We no longer use setDeposit - the deposit is now set upon the validator start.

validator.start(deposit)

johnreitano commented 5 years ago

When I call validator.start(x), I get an error message:

> validator.setCoinbase(kcoin.accounts[0])
true
>  x = mtoken.getBalance(kcoin.accounts[0]);
1.000002e+24
> validator.start(x);
Error: invalid argument 0: math/big: cannot unmarshal "\"1.000002e+24\"" into a *big.Int
    at web3.js:3104:20
    at web3.js:6191:15
    at web3.js:5004:36
    at <anonymous>:1:1

What the correct way to call validator.start()?