Commit 3e747050 authored by kingwang's avatar kingwang Committed by vipwzw

fix test

parent 44cfc785
...@@ -610,7 +610,7 @@ chain33_GetAllExecBalance() { ...@@ -610,7 +610,7 @@ chain33_GetAllExecBalance() {
[ "$ok" == true ] [ "$ok" == true ]
ok=$(jq '(.result.execAccount | [map(has("execer", "account")), true] | flatten | unique | length == 1)' <<<"$resp") ok=$(jq '(.result.execAccount | [map(has("execer", "account")), true] | flatten | unique | length == 1)' <<<"$resp")
[ "$ok" == true ] [ "$ok" == true ]
ok=$(jq '(.result.execAccount[].account | [.] | [map(has("balance", "frozen")), true] | flatten | unique | length == 1)' <<<"$resp") ok=$(jq '([.result.execAccount[].account] | [map(has("balance", "frozen")), true] | flatten | unique | length == 1)' <<<"$resp")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
} }
......
...@@ -40,6 +40,13 @@ func Register(name string, create DriverCreate, height int64) { ...@@ -40,6 +40,13 @@ func Register(name string, create DriverCreate, height int64) {
height: height, height: height,
} }
registedExecDriver[name] = driverWithHeight registedExecDriver[name] = driverWithHeight
if types.IsPara() {
//平行链的合约地址是通过user.p.x.name计算的
paraDriverName := types.ExecName(name)
registerAddress(paraDriverName)
execDrivers[ExecAddress(paraDriverName)] = driverWithHeight
}
//考虑到前期平行链兼容性和防止误操作(平行链下转账到一个主链合约),也会注册主链合约(不带前缀)的地址
registerAddress(name) registerAddress(name)
execDrivers[ExecAddress(name)] = driverWithHeight execDrivers[ExecAddress(name)] = driverWithHeight
} }
......
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