Commit 7a461425 authored by mdj33's avatar mdj33 Committed by vipwzw

update chain33

parent fde7a753
......@@ -3,7 +3,7 @@ module github.com/33cn/plugin
go 1.14
require (
github.com/33cn/chain33 v1.65.3-0.20210823062002-c3d9f3806543
github.com/33cn/chain33 v1.65.3-0.20210824024448-c73616b9f5de
github.com/BurntSushi/toml v0.3.1
github.com/NebulousLabs/Sia v1.3.7
github.com/NebulousLabs/errors v0.0.0-20181203160057-9f787ce8f69e // indirect
......@@ -15,7 +15,6 @@ require (
github.com/btcsuite/btcd v0.21.0-beta
github.com/coreos/etcd v3.3.15+incompatible
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/davecgh/go-spew v1.1.1
github.com/ethereum/go-ethereum v1.10.0
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
......@@ -25,7 +24,6 @@ require (
github.com/holiman/uint256 v1.1.1
github.com/huin/goupnp v1.0.1-0.20200620063722-49508fba0031
github.com/jackpal/go-nat-pmp v1.0.2
github.com/miguelmota/go-solidity-sha3 v0.1.0
github.com/mr-tron/base58 v1.2.0
github.com/pborman/uuid v1.2.0
github.com/perlin-network/life v0.0.0-20191203030451-05c0e0f7eaea
......@@ -39,10 +37,9 @@ require (
github.com/stretchr/testify v1.7.0
github.com/tjfoc/gmsm v1.3.2
github.com/valyala/fasthttp v1.5.0
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6
golang.org/x/sys v0.0.0-20210426080607-c94f62235c83
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 // indirect
google.golang.org/grpc v1.33.2
gopkg.in/sourcemap.v1 v1.0.5 // indirect
......
......@@ -5,6 +5,7 @@
package para
import (
"fmt"
"testing"
"github.com/33cn/chain33/types"
......@@ -20,13 +21,13 @@ func getTestInv(height int64, isDone bool) *inventory {
headDetail := &types.ParaTxDetail{
Type: types.AddBlock,
Header: &types.Header{
ParentHash: []byte(string(height - 1)),
Hash: []byte(string(height))}}
ParentHash: []byte(fmt.Sprint(height - 1)),
Hash: []byte(fmt.Sprint(height))}}
endDetail := &types.ParaTxDetail{
Type: types.AddBlock,
Header: &types.Header{
ParentHash: []byte(string(height + count - 2)),
Hash: []byte(string(height + count - 1))}}
ParentHash: []byte(fmt.Sprint(height + count - 2)),
Hash: []byte(fmt.Sprint(height + count - 1))}}
txs1 := &types.ParaTxDetails{Items: []*types.ParaTxDetail{headDetail, endDetail, endDetail}}
return &inventory{
start: height,
......@@ -78,7 +79,7 @@ func TestVerifyInvs(t *testing.T) {
preBlock := &types.ParaTxDetail{
Type: types.AddBlock,
Header: &types.Header{Hash: []byte(string(start - 1))},
Header: &types.Header{Hash: []byte(fmt.Sprint(start - 1))},
}
d := &downloadJob{
parentBlock: preBlock,
......
......@@ -608,7 +608,7 @@ func TestGetStartHeightVoteAccount(t *testing.T) {
account, err := action.getStartHeightVoteAccount(addr, "", 0)
assert.NoError(t, err)
assert.NotNil(t, account)
assert.Equal(t, types.DefaultCoinsExec, account.Balance)
assert.Equal(t, types.DefaultCoinPrecision, account.Balance)
}
func TestGetReceiptLog(t *testing.T) {
......
......@@ -61,7 +61,7 @@ func NewExecCli() *ExecCli {
cfg.SetTitleOnlyForTest("chain33")
executor.Init(et.ExchangeX, cfg, nil)
total := 100000000 * types.Coin
total := 100000000 * types.DefaultCoinPrecision
accountA := &types.Account{
Balance: total,
Frozen: 0,
......
......@@ -26,6 +26,7 @@ type Signatory struct {
}
const coinExec = "coins"
const coinPrecision = int64(1e8)
// Echo echo
func (*Signatory) Echo(in *string, out *interface{}) error {
......@@ -88,7 +89,7 @@ func (signatory *Signatory) SignTransfer(in *string, out *interface{}) error {
return types.ErrInvalidParam
}
amount := 1 * types.Coin
amount := 1 * coinPrecision
v := &types.AssetsTransfer{
Amount: amount,
Note: []byte("transfer 1 bty by signatory-server"),
......
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