Skip to content

Commit

Permalink
Merge pull request #13 from palletone/testnet
Browse files Browse the repository at this point in the history
Testnet
  • Loading branch information
studyzy committed Nov 27, 2019
2 parents cdd3e98 + 866afb1 commit 62ba0e8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cmd/gptn/genesis_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func initialMediatorCandidates(mediators []*mp.MediatorConf, nodeInfo string,
m := mediators[i]
im := core.NewInitialMediator()
im.AddStr = m.Address
im.RewardAdd = m.Address
//im.RewardAdd = m.Address
im.InitPubKey = m.InitPubKey
im.Node = nodeInfo
im.JurorDepositExtraJson = jdes[i]
Expand Down
2 changes: 1 addition & 1 deletion common/p2p/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ loop:
}
}

log.Error("Peer->run", "p.id", p.ID().TerminalString(), "reason", reason.String(), "err", err)
//log.Debug("Peer->run", "p.id", p.ID().TerminalString(), "reason", reason.String(), "err", err)
close(p.closed)
p.rw.close(reason)
p.wg.Wait()
Expand Down
12 changes: 5 additions & 7 deletions configure/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ import (
)

const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 0 // Minor version component of the current release
VersionPatch = 4 // Patch version component of the current release
VersionMeta = "beta" // Version metadata to append to the version string
VersionMajor = 1 // Major version component of the current release
VersionMinor = 0 // Minor version component of the current release
VersionPatch = 4 // Patch version component of the current release
VersionMeta = "release" // Version metadata to append to the version string

)

// Version holds the textual version string.
var Version = func() string {
v := fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch)
if VersionMeta != "" {
v += "-" + VersionMeta
}
v += "-" + VersionMeta
return v
}()

Expand Down
2 changes: 1 addition & 1 deletion core/gen/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func InitialMediatorCandidates(len int, address, pubkey string) []*core.InitialM
for i := 0; i < len; i++ {
im := core.NewInitialMediator()
im.AddStr = address
im.RewardAdd = address
//im.RewardAdd = address
im.InitPubKey = core.DefaultInitPubKey
im.Node = deFaultNode
im.PublicKey = pubkey
Expand Down
3 changes: 2 additions & 1 deletion dag/migration/migration102gamma.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ func (m *Migration102beta_102gamma) upgradeMediatorInfo() error {

mib := &core.MediatorInfoBase{
AddStr: oldMediator.AddStr,
RewardAdd: oldMediator.AddStr,
//RewardAdd: oldMediator.AddStr,
RewardAdd: "",
InitPubKey: oldMediator.InitPubKey,
Node: oldMediator.Node,
}
Expand Down
7 changes: 4 additions & 3 deletions dag/storage/statedb_contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,10 @@ func (statedb *StateDb) UpdateStateByContractInvoke(invoke *modules.ContractInvo
mi := modules.NewMediatorInfo()
mi.MediatorInfoBase = mco.MediatorInfoBase
mi.MediatorApplyInfo = mco.MediatorApplyInfo
if mi.RewardAdd == "" {
mi.RewardAdd = mi.AddStr
}

//if mi.RewardAdd == "" {
// mi.RewardAdd = mi.AddStr
//}

// 判断是否是1.0.2之前的mediator
if pubKey, isFind := constants.OldMainNetMediatorAndPubKey[mco.AddStr]; isFind {
Expand Down
4 changes: 2 additions & 2 deletions internal/ptnapi/mediator_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (a *PublicMediatorAPI) IsApproved(addStr string) (string, error) {
//txid := fmt.Sprintf("%08v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(100000000))

// 调用系统合约
rsp, err := a.ContractQuery(syscontract.DepositContractAddress.Bytes(), cArgs, 0)
rsp, err := a.ContractQuery([]byte(syscontract.DepositContractAddress.Str()), cArgs, 0)
if err != nil {
return "", err
}
Expand All @@ -62,7 +62,7 @@ func getDeposit(addStr string, a Backend) (*modules.MediatorDepositJson, error)
//txid := fmt.Sprintf("%08v", rand.New(rand.NewSource(time.Now().Unix())).Int31n(100000000))

// 调用系统合约
rsp, err := a.ContractQuery(syscontract.DepositContractAddress.Bytes(), cArgs, 0)
rsp, err := a.ContractQuery([]byte(syscontract.DepositContractAddress.Str()), cArgs, 0)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/ptnapi/ptn_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (s *PublicBlockChainAPI) GetPledge(addStr string) (*modules.PledgeStatusJso
//txid := fmt.Sprintf("%08v", rand.New(rand.NewSource(time.Now().Unix())).Int31n(100000000))

// 调用系统合约
rsp, err := s.b.ContractQuery(syscontract.DepositContractAddress.Bytes(), cArgs, 0)
rsp, err := s.b.ContractQuery([]byte(syscontract.DepositContractAddress.Str()), cArgs, 0)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 62ba0e8

Please sign in to comment.