Commit 7f98de46 authored by linj's avatar linj Committed by vipwzw

merge ForkTokenCheckAddress ForkTokenCheckPrepareX to ForkTokenCheck

parent 934009af
......@@ -68,7 +68,7 @@ func TestToken(t *testing.T) {
env := execEnv{
10,
types.GetDappFork(pty.TokenX, "ForkTokenCheckAddress"),
types.GetDappFork(pty.TokenX, pty.ForkTokenCheckX),
1539918074,
}
......
......@@ -157,7 +157,7 @@ func (action *tokenAction) preCreate(token *pty.TokenPreCreate) (*types.Receipt,
} else if token.GetTotal() > types.MaxTokenBalance || token.GetTotal() <= 0 {
return nil, pty.ErrTokenTotalOverflow
}
if types.IsDappFork(action.height, pty.TokenX, "ForkTokenCheckAddress") {
if types.IsDappFork(action.height, pty.TokenX, pty.ForkTokenCheckX) {
if err := address.CheckAddress(token.Owner); err != nil {
return nil, err
}
......@@ -365,7 +365,7 @@ func checkTokenExist(token string, db dbm.KV) bool {
return err == nil
}
// bug: prepare again after revoke, need to check status, fixed in fork ForkTokenCheckPrepareX
// bug: prepare again after revoke, need to check status, fixed in fork ForkTokenCheckX
func checkTokenHasPrecreate(token, owner string, status int32, db dbm.KV) bool {
_, err := db.Get(calcTokenAddrKeyS(token, owner))
if err == nil {
......@@ -376,7 +376,7 @@ func checkTokenHasPrecreate(token, owner string, status int32, db dbm.KV) bool {
}
func checkTokenHasPrecreateWithHeight(token, owner string, db dbm.KV, height int64) bool {
if !types.IsDappFork(height, pty.TokenX, pty.ForkTokenCheckPrepareX) {
if !types.IsDappFork(height, pty.TokenX, pty.ForkTokenCheckX) {
return checkTokenHasPrecreate(token, owner, pty.TokenStatusPreCreated, db)
}
......
......@@ -47,8 +47,8 @@ var (
ForkTokenPriceX = "ForkTokenPrice"
// ForkTokenSymbolWithNumberX fork const
ForkTokenSymbolWithNumberX = "ForkTokenSymbolWithNumber"
// ForkTokenCheckPrepareX fork check impl bug
ForkTokenCheckPrepareX = "ForkTokenCheckPrepare"
// ForkTokenCheckX fork check impl bug
ForkTokenCheckX = "ForkTokenCheck"
)
const (
......
......@@ -23,8 +23,7 @@ func init() {
types.RegisterDappFork(TokenX, ForkBadTokenSymbolX, 184000)
types.RegisterDappFork(TokenX, ForkTokenPriceX, 560000)
types.RegisterDappFork(TokenX, ForkTokenSymbolWithNumberX, 1298600)
types.RegisterDappFork(TokenX, "ForkTokenCheckAddress", 1600000)
types.RegisterDappFork(TokenX, ForkTokenCheckPrepareX, 1600000)
types.RegisterDappFork(TokenX, ForkTokenCheckX, 1600000)
}
// TokenType 执行器基类结构体
......
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