Commit c20beabf authored by linj's avatar linj

GetRetrieveInfo fix query with asset

parent fe9c161a
...@@ -29,11 +29,9 @@ func (r *Retrieve) Query_GetRetrieveInfo(in *rt.ReqRetrieveInfo) (types.Message, ...@@ -29,11 +29,9 @@ func (r *Retrieve) Query_GetRetrieveInfo(in *rt.ReqRetrieveInfo) (types.Message,
if info.Status == retrievePerform && in.GetAssetExec() != "" { if info.Status == retrievePerform && in.GetAssetExec() != "" {
// retrievePerform状态下,不存在有两种情况 // retrievePerform状态下,不存在有两种情况
// 1 还没找回, 2 fork 之前是没有coins 找回记录的 // 1 还没找回, 2 fork 之前是没有coins 找回记录的
count := r.GetLocalDB().PrefixCount(calcRetrieveAssetPrefix(in.BackupAddress, in.DefaultAddress))
// 2 fork 之前是 没有coins 找回记录的, 相当于都找回了 // 2 fork 之前是 没有coins 找回记录的, 相当于都找回了
if count == 0 { // localdb not support PrefixCount
return info, nil // 所以在填写具体资产的情况下, 认为是要找对应的资产
}
asset, _ := getRetrieveAsset(r.GetLocalDB(), in.BackupAddress, in.DefaultAddress, in.AssetExec, in.AssetSymbol) asset, _ := getRetrieveAsset(r.GetLocalDB(), in.BackupAddress, in.DefaultAddress, in.AssetExec, in.AssetSymbol)
if asset != nil { if asset != nil {
......
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