Commit 7dc63f1b authored by 张振华's avatar 张振华

update

parents 907c003e b9bfbf4e
......@@ -165,7 +165,7 @@ func (cs *ConsensusState) GetValidatorMgr() ValidatorMgr {
}
// GetPrivValidator returns the pointer of PrivValidator
func (cs *ConsensusState) GetPrivValidator() ttypes.PrivValidator{
func (cs *ConsensusState) GetPrivValidator() ttypes.PrivValidator {
return cs.privValidator
}
......
......@@ -760,6 +760,6 @@ func printCandidators(cands []*dty.Candidator) string {
}
// GetConsensusState return the pointer to ConsensusState
func (client *Client)GetConsensusState() *ConsensusState {
func (client *Client) GetConsensusState() *ConsensusState {
return client.csState
}
......@@ -8,14 +8,13 @@ import (
"flag"
"fmt"
"github.com/spf13/cobra"
"io/ioutil"
"math/rand"
"os"
"testing"
"time"
"github.com/spf13/cobra"
"github.com/33cn/chain33/blockchain"
"github.com/33cn/chain33/common/address"
......@@ -72,7 +71,6 @@ func init() {
os.Remove("genesis_file.json")
os.Remove("priv_validator_0.json")
ioutil.WriteFile("genesis.json", []byte(genesis), 0664)
ioutil.WriteFile("priv_validator.json", []byte(priv), 0664)
}
......@@ -248,7 +246,7 @@ func testCmd(cmd *cobra.Command) {
rootCmd.SetArgs([]string{"dpos", "reRegist", "--address", validatorAddr, "--pubkey",strPubkey, "--ip", "127.0.0.1", "--rpc_laddr", "http://127.0.0.1:8801"})
rootCmd.Execute()
rootCmd.SetArgs([]string{"dpos", "candidatorQuery", "--type", "topN", "--top","1"})
rootCmd.SetArgs([]string{"dpos", "candidatorQuery", "--type", "topN", "--top", "1"})
rootCmd.Execute()
rootCmd.SetArgs([]string{"dpos", "candidatorQuery", "--type", "pubkeys", "--pubkeys",strPubkey})
......@@ -278,7 +276,7 @@ func testCmd(cmd *cobra.Command) {
rootCmd.SetArgs([]string{"dpos", "vrfMRegist", "--cycle", "1000", "--m", "data1", "--pubkey", strPubkey})
rootCmd.Execute()
rootCmd.SetArgs([]string{"dpos", "vrfRPRegist", "--cycle", "1000", "--hash", "22a58fbbe8002939b7818184e663e6c57447f4354adba31ad3c7f556e153353c","--proof", "5ed22d8c1cc0ad131c1c9f82daec7b99ff25ae5e717624b4a8cf60e0f3dca2c97096680cd8df0d9ed8662ce6513edf5d1676ad8d72b7e4f0e0de687bd38623f404eb085d28f5631207cf97a02c55f835bd3733241c7e068b80cf75e2afd12fd4c4cb8e6f630afa2b7b2918dff3d279e50acab59da1b25b3ff920b69c443da67320", "--pubkey", "03EF0E1D3112CF571743A3318125EDE2E52A4EB904BCBAA4B1F75020C2846A7EB4"})
rootCmd.SetArgs([]string{"dpos", "vrfRPRegist", "--cycle", "1000", "--hash", "22a58fbbe8002939b7818184e663e6c57447f4354adba31ad3c7f556e153353c", "--proof", "5ed22d8c1cc0ad131c1c9f82daec7b99ff25ae5e717624b4a8cf60e0f3dca2c97096680cd8df0d9ed8662ce6513edf5d1676ad8d72b7e4f0e0de687bd38623f404eb085d28f5631207cf97a02c55f835bd3733241c7e068b80cf75e2afd12fd4c4cb8e6f630afa2b7b2918dff3d279e50acab59da1b25b3ff920b69c443da67320", "--pubkey", "03EF0E1D3112CF571743A3318125EDE2E52A4EB904BCBAA4B1F75020C2846A7EB4"})
rootCmd.Execute()
rootCmd.SetArgs([]string{"dpos", "vrfQuery", "--type", "dtime", "--time", "2006-01-02 15:04:05"})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment