Commit cfbc420a authored by mdj33's avatar mdj33 Committed by vipwzw

update chain33

parent f159931f
......@@ -18,9 +18,9 @@ proj := "build"
default: depends build
build: depends
go build $(BUILD_FLAGS) -v -i -o $(APP)
go build $(BUILD_FLAGS) -v -i -o $(CLI) $(SRC_CLI)
go build $(BUILD_FLAGS) -v -i -o build/fork-config github.com/33cn/plugin/cli/fork_config/
go build $(BUILD_FLAGS) -v -o $(APP)
go build $(BUILD_FLAGS) -v -o $(CLI) $(SRC_CLI)
go build $(BUILD_FLAGS) -v -o build/fork-config github.com/33cn/plugin/cli/fork_config/
@cp chain33.toml build/
@cp chain33.para.toml build/ci/paracross/
......
......@@ -3,7 +3,7 @@ module github.com/33cn/plugin
go 1.14
require (
github.com/33cn/chain33 v1.65.3-0.20210701072221-e36c055c9424
github.com/33cn/chain33 v1.65.3-0.20210720093539-f1883621ab01
github.com/BurntSushi/toml v0.3.1
github.com/NebulousLabs/Sia v1.3.7
github.com/NebulousLabs/errors v0.0.0-20181203160057-9f787ce8f69e // indirect
......
......@@ -7,10 +7,8 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
github.com/33cn/chain33 v1.65.3-0.20210630082543-4b01e8ab4246 h1:QterS7MuW/mXIIqW5xDN5gH8gz2nNIomBwi4LP/6r3w=
github.com/33cn/chain33 v1.65.3-0.20210630082543-4b01e8ab4246/go.mod h1:dLHHc1HwIy1YKmluXIJYGbv/Bet7yR2fyjinXWqLgV4=
github.com/33cn/chain33 v1.65.3-0.20210701072221-e36c055c9424 h1:UabMKI0FDTQxHyoW3W0acKyXUpdVef82Kc6sMVPUo5Y=
github.com/33cn/chain33 v1.65.3-0.20210701072221-e36c055c9424/go.mod h1:dLHHc1HwIy1YKmluXIJYGbv/Bet7yR2fyjinXWqLgV4=
github.com/33cn/chain33 v1.65.3-0.20210720093539-f1883621ab01 h1:CmjpseZUFVUHQ5AR8Ba6FQ2JwxIZwQzHTsJW9YlWWLY=
github.com/33cn/chain33 v1.65.3-0.20210720093539-f1883621ab01/go.mod h1:dLHHc1HwIy1YKmluXIJYGbv/Bet7yR2fyjinXWqLgV4=
github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9 h1:HD8gA2tkByhMAwYaFAX9w2l7vxvBQ5NMoxDrkhqhtn4=
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
......
......@@ -95,7 +95,7 @@ func (c *Jrpc) GetPrivacyTxByAddr(in *pty.ReqPrivacyTransactionList, result *int
return err
}
var txdetails rpctypes.WalletTxDetails
err = rpctypes.ConvertWalletTxDetailToJSON(reply.(*types.WalletTxDetails), &txdetails)
err = rpctypes.ConvertWalletTxDetailToJSON(reply.(*types.WalletTxDetails), &txdetails, c.cli.GetConfig().GetCoinExec())
if err != nil {
return err
}
......
......@@ -61,7 +61,7 @@ func (policy *privacyPolicy) getWalletOperate() wcom.WalletOperate {
// Init 初始化处理
func (policy *privacyPolicy) Init(walletOperate wcom.WalletOperate, sub []byte) {
policy.setWalletOperate(walletOperate)
policy.store = newStore(walletOperate.GetDBStore())
policy.store = newStore(walletOperate.GetDBStore(), walletOperate.GetAPI().GetConfig().GetCoinExec())
// 启动定时检查超期FTXO的协程
walletOperate.GetWaitGroup().Add(1)
go policy.checkWalletStoreData()
......
......@@ -23,12 +23,13 @@ const (
PRIVACYDBVERSION int64 = 1
)
func newStore(db db.DB) *privacyStore {
return &privacyStore{Store: wcom.NewStore(db)}
func newStore(db db.DB, coinsExec string) *privacyStore {
return &privacyStore{Store: wcom.NewStore(db), coinsExec: coinsExec}
}
// privacyStore 隐私交易数据库存储操作类
type privacyStore struct {
coinsExec string
*wcom.Store
}
......@@ -256,7 +257,7 @@ func (store *privacyStore) getWalletPrivacyTxDetails(param *privacytypes.ReqPriv
return nil, types.ErrUnmarshal
}
txDetail.Txhash = txDetail.GetTx().Hash()
if txDetail.GetTx().IsWithdraw() {
if txDetail.GetTx().IsWithdraw(store.coinsExec) {
//swap from and to
txDetail.Fromaddr, txDetail.Tx.To = txDetail.Tx.To, txDetail.Fromaddr
}
......
......@@ -9,7 +9,7 @@ SRC_RELAYD=github.com/33cn/plugin/plugin/dapp/relay/cmd/relayd
FLAG=$2
# shellcheck disable=SC2086,1072
go build -i ${FLAG} -v -o "${OUT_DIR}/relayd" "${SRC_RELAYD}"
go build ${FLAG} -v -o "${OUT_DIR}/relayd" "${SRC_RELAYD}"
cp ./relayd/relayd.toml "${OUT_DIR}/relayd.toml"
cp ./build/* "${OUT_DIR}"
......
......@@ -11,15 +11,15 @@ OUT_DIR="${1}/$strapp"
FLAG=$2
# shellcheck disable=SC2086,1072
go build -i ${FLAG} -v -o "${OUT_DIR}/ebrelayer" "${SRC_EBRELAYER}"
go build ${FLAG} -v -o "${OUT_DIR}/ebrelayer" "${SRC_EBRELAYER}"
# shellcheck disable=SC2086,1072
go build -i ${FLAG} -v -o "${OUT_DIR}/ebcli_A" "${SRC_EBCLI}"
go build ${FLAG} -v -o "${OUT_DIR}/ebcli_A" "${SRC_EBCLI}"
# shellcheck disable=SC2086,1072
go build -i ${FLAG} -v -o "${OUT_DIR}/ebcli_B" -ldflags "-X ${SRC_EBCLI}/buildflags.RPCAddr=http://localhost:9902" "${SRC_EBCLI}"
go build ${FLAG} -v -o "${OUT_DIR}/ebcli_B" -ldflags "-X ${SRC_EBCLI}/buildflags.RPCAddr=http://localhost:9902" "${SRC_EBCLI}"
# shellcheck disable=SC2086,1072
go build -i ${FLAG} -v -o "${OUT_DIR}/ebcli_C" -ldflags "-X ${SRC_EBCLI}/buildflags.RPCAddr=http://localhost:9903" "${SRC_EBCLI}"
go build ${FLAG} -v -o "${OUT_DIR}/ebcli_C" -ldflags "-X ${SRC_EBCLI}/buildflags.RPCAddr=http://localhost:9903" "${SRC_EBCLI}"
# shellcheck disable=SC2086,1072
go build -i ${FLAG} -v -o "${OUT_DIR}/ebcli_D" -ldflags "-X ${SRC_EBCLI}/buildflags.RPCAddr=http://localhost:9904" "${SRC_EBCLI}"
go build ${FLAG} -v -o "${OUT_DIR}/ebcli_D" -ldflags "-X ${SRC_EBCLI}/buildflags.RPCAddr=http://localhost:9904" "${SRC_EBCLI}"
cp ../ebrelayer/relayer.toml "${OUT_DIR}/relayer.toml"
cp ./build/* "${OUT_DIR}"
......
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