Commit cced1c38 authored by vipwzw's avatar vipwzw

auto ci

parent 0409f6d5
...@@ -1163,7 +1163,7 @@ func (a *action) isAllowTransfer() error { ...@@ -1163,7 +1163,7 @@ func (a *action) isAllowTransfer() error {
} }
//2. 非跨链执行器不允许 //2. 非跨链执行器不允许
if !types.IsParaExecName(string(a.tx.Execer)) { if !types.IsParaExecName(string(a.tx.Execer)) {
return errors.Wrapf(types.ErrInvalidParam,"exec=%s,should prefix with user.p.",string(a.tx.Execer)) return errors.Wrapf(types.ErrInvalidParam, "exec=%s,should prefix with user.p.", string(a.tx.Execer))
} }
return nil return nil
......
...@@ -823,12 +823,12 @@ func TestUpdateCommitBlockHashs(t *testing.T) { ...@@ -823,12 +823,12 @@ func TestUpdateCommitBlockHashs(t *testing.T) {
} }
func TestValidParaCrossExec(t *testing.T){ func TestValidParaCrossExec(t *testing.T) {
exec := []byte("paracross") exec := []byte("paracross")
valid := types.IsParaExecName(string(exec)) valid := types.IsParaExecName(string(exec))
assert.Equal(t,false,valid) assert.Equal(t, false, valid)
exec = []byte("user.p.para.paracross") exec = []byte("user.p.para.paracross")
valid = types.IsParaExecName(string(exec)) valid = types.IsParaExecName(string(exec))
assert.Equal(t,true,valid) assert.Equal(t, true, valid)
} }
...@@ -991,7 +991,7 @@ func (a *action) NodeGroupConfig(config *pt.ParaNodeGroupConfig) (*types.Receipt ...@@ -991,7 +991,7 @@ func (a *action) NodeGroupConfig(config *pt.ParaNodeGroupConfig) (*types.Receipt
return nil, pt.ErrInvalidTitle return nil, pt.ErrInvalidTitle
} }
if !types.IsParaExecName(string(a.tx.Execer)) && cfg.IsDappFork(a.exec.GetMainHeight(), pt.ParaX, pt.ForkParaAssetTransferRbk) { if !types.IsParaExecName(string(a.tx.Execer)) && cfg.IsDappFork(a.exec.GetMainHeight(), pt.ParaX, pt.ForkParaAssetTransferRbk) {
return nil,errors.Wrapf(types.ErrInvalidParam,"exec=%s,should prefix with user.p.",string(a.tx.Execer)) return nil, errors.Wrapf(types.ErrInvalidParam, "exec=%s,should prefix with user.p.", string(a.tx.Execer))
} }
if config.Op == pt.ParacrossNodeGroupApply { if config.Op == pt.ParacrossNodeGroupApply {
...@@ -1032,7 +1032,7 @@ func (a *action) NodeConfig(config *pt.ParaNodeAddrConfig) (*types.Receipt, erro ...@@ -1032,7 +1032,7 @@ func (a *action) NodeConfig(config *pt.ParaNodeAddrConfig) (*types.Receipt, erro
return nil, pt.ErrInvalidTitle return nil, pt.ErrInvalidTitle
} }
if !types.IsParaExecName(string(a.tx.Execer)) && cfg.IsDappFork(a.exec.GetMainHeight(), pt.ParaX, pt.ForkParaAssetTransferRbk) { if !types.IsParaExecName(string(a.tx.Execer)) && cfg.IsDappFork(a.exec.GetMainHeight(), pt.ParaX, pt.ForkParaAssetTransferRbk) {
return nil,errors.Wrapf(types.ErrInvalidParam,"exec=%s,should prefix with user.p.",string(a.tx.Execer)) return nil, errors.Wrapf(types.ErrInvalidParam, "exec=%s,should prefix with user.p.", string(a.tx.Execer))
} }
if config.Op == pt.ParaOpNewApply { if config.Op == pt.ParaOpNewApply {
......
...@@ -331,8 +331,6 @@ func (p ParacrossType) CreateRawTransferTx(action string, param json.RawMessage) ...@@ -331,8 +331,6 @@ func (p ParacrossType) CreateRawTransferTx(action string, param json.RawMessage)
return tx, nil return tx, nil
} }
//GetDappForkHeight get paracross dapp fork height //GetDappForkHeight get paracross dapp fork height
func GetDappForkHeight(cfg *types.Chain33Config, forkKey string) int64 { func GetDappForkHeight(cfg *types.Chain33Config, forkKey string) int64 {
var forkHeight int64 var forkHeight int64
......
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