Commit 2e4b635d authored by pengjun's avatar pengjun

#627 remove collateralize close; add collateralize retrieve

parent 5523229c
...@@ -24,7 +24,7 @@ func CollateralizeCmd() *cobra.Command { ...@@ -24,7 +24,7 @@ func CollateralizeCmd() *cobra.Command {
CollateralizeAppendRawTxCmd(), CollateralizeAppendRawTxCmd(),
CollateralizeRepayRawTxCmd(), CollateralizeRepayRawTxCmd(),
CollateralizePriceFeedRawTxCmd(), CollateralizePriceFeedRawTxCmd(),
CollateralizeCloseRawTxCmd(), CollateralizeRetrieveRawTxCmd(),
CollateralizeManageRawTxCmd(), CollateralizeManageRawTxCmd(),
CollateralizeQueryCmd(), CollateralizeQueryCmd(),
) )
...@@ -233,22 +233,24 @@ func CollateralizePriceFeed(cmd *cobra.Command, args []string) { ...@@ -233,22 +233,24 @@ func CollateralizePriceFeed(cmd *cobra.Command, args []string) {
} }
// CollateralizeCloseRawTxCmd 生成开始交易命令行 // CollateralizeCloseRawTxCmd 生成开始交易命令行
func CollateralizeCloseRawTxCmd() *cobra.Command { func CollateralizeRetrieveRawTxCmd() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "close", Use: "retrieve",
Short: "close a collateralize", Short: "retrieve balance",
Run: CollateralizeClose, Run: CollateralizeRetrieve,
} }
addCollateralizeCloseFlags(cmd) addCollateralizeRetrieveFlags(cmd)
return cmd return cmd
} }
func addCollateralizeCloseFlags(cmd *cobra.Command) { func addCollateralizeRetrieveFlags(cmd *cobra.Command) {
cmd.Flags().StringP("collateralizeID", "g", "", "collateralize ID") cmd.Flags().StringP("collateralizeID", "g", "", "collateralize ID")
cmd.MarkFlagRequired("collateralizeID") cmd.MarkFlagRequired("collateralizeID")
cmd.Flags().StringP("balance", "b", "", "retrieve balance")
cmd.MarkFlagRequired("balance")
} }
func CollateralizeClose(cmd *cobra.Command, args []string) { func CollateralizeRetrieve(cmd *cobra.Command, args []string) {
title, _ := cmd.Flags().GetString("title") title, _ := cmd.Flags().GetString("title")
cfg := types.GetCliSysParam(title) cfg := types.GetCliSysParam(title)
if cfg == nil { if cfg == nil {
...@@ -257,11 +259,12 @@ func CollateralizeClose(cmd *cobra.Command, args []string) { ...@@ -257,11 +259,12 @@ func CollateralizeClose(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr") rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
collateralizeID, _ := cmd.Flags().GetString("collateralizeID") collateralizeID, _ := cmd.Flags().GetString("collateralizeID")
balance, _ := cmd.Flags().GetInt64("balance")
params := &rpctypes.CreateTxIn{ params := &rpctypes.CreateTxIn{
Execer: cfg.ExecName(pkt.CollateralizeX), Execer: cfg.ExecName(pkt.CollateralizeX),
ActionName: "CollateralizeClose", ActionName: "CollateralizeRetrieve",
Payload: []byte(fmt.Sprintf("{\"collateralizeID\":\"%s\"}", collateralizeID)), Payload: []byte(fmt.Sprintf("{\"collateralizeID\":\"%s\", \"balance\": %d}", collateralizeID, balance)),
} }
var res string var res string
......
...@@ -528,11 +528,12 @@ func TestCollateralize(t *testing.T) { ...@@ -528,11 +528,12 @@ func TestCollateralize(t *testing.T) {
assert.NotNil(t, res) assert.NotNil(t, res)
// collateralize close // collateralize retrieve
p11 := &pkt.CollateralizeCloseTx{ p11 := &pkt.CollateralizeRetrieveTx{
CollateralizeID: common.ToHex(collateralizeID), CollateralizeID: common.ToHex(collateralizeID),
Balance:100,
} }
createTx, err = pkt.CreateRawCollateralizeCloseTx(env.cfg, p11) createTx, err = pkt.CreateRawCollateralizeRetrieveTx(env.cfg, p11)
if err != nil { if err != nil {
t.Error("RPC_Default_Process", "err", err) t.Error("RPC_Default_Process", "err", err)
} }
...@@ -558,7 +559,7 @@ func TestCollateralize(t *testing.T) { ...@@ -558,7 +559,7 @@ func TestCollateralize(t *testing.T) {
env.kvdb.Set(kv.Key, kv.Value) env.kvdb.Set(kv.Key, kv.Value)
} }
// query collateralize by status // query collateralize by status
res, err = exec.Query("CollateralizeByStatus", types.Encode(&pkt.ReqCollateralizeByStatus{Status:2})) res, err = exec.Query("CollateralizeByStatus", types.Encode(&pkt.ReqCollateralizeByStatus{Status:1}))
assert.Nil(t, err) assert.Nil(t, err)
assert.NotNil(t, res) assert.NotNil(t, res)
} }
......
...@@ -206,7 +206,7 @@ func (action *Action) GetFeedReceiptLog(collateralize *pty.Collateralize, record ...@@ -206,7 +206,7 @@ func (action *Action) GetFeedReceiptLog(collateralize *pty.Collateralize, record
// GetCloseReceiptLog generate logs for Collateralize close action // GetCloseReceiptLog generate logs for Collateralize close action
func (action *Action) GetCloseReceiptLog(collateralize *pty.Collateralize) *types.ReceiptLog { func (action *Action) GetCloseReceiptLog(collateralize *pty.Collateralize) *types.ReceiptLog {
log := &types.ReceiptLog{} log := &types.ReceiptLog{}
log.Ty = pty.TyLogCollateralizeClose log.Ty = pty.TyLogCollateralizeRetrieve
c := &pty.ReceiptCollateralize{} c := &pty.ReceiptCollateralize{}
c.CollateralizeId = collateralize.CollateralizeId c.CollateralizeId = collateralize.CollateralizeId
...@@ -368,18 +368,16 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ ...@@ -368,18 +368,16 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
return nil, pty.ErrPermissionDeny return nil, pty.ErrPermissionDeny
} }
collateralizeID := common.ToHex(action.txhash)
// 检查ccny余额 // 检查ccny余额
if !action.CheckExecTokenAccount(action.fromaddr, create.TotalBalance, false) { if !action.CheckExecTokenAccount(action.fromaddr, create.TotalBalance, false) {
clog.Error("CollateralizeCreate", "fromaddr", action.fromaddr, "balance", create.TotalBalance, "error", types.ErrInsufficientBalance) clog.Error("CollateralizeCreate", "fromaddr", action.fromaddr, "balance", create.TotalBalance, "error", types.ErrInsufficientBalance)
return nil, types.ErrInsufficientBalance return nil, types.ErrInsufficientBalance
} }
// 查找ID是否重复 // 根据地址查找ID
_, err := queryCollateralizeByID(action.db, collateralizeID) collateralizeIDs, err := queryCollateralizeByAddr(action.localDB, action.fromaddr, pty.CollateralizeStatusCreated, 0)
if err != types.ErrNotFound { if err != types.ErrNotFound {
clog.Error("CollateralizeCreate", "CollateralizeCreate repeated", collateralizeID) clog.Error("CollateralizeCreate.queryCollateralizeByAddr", "addr", action.fromaddr)
return nil, pty.ErrCollateralizeRepeatHash return nil, pty.ErrCollateralizeRepeatHash
} }
...@@ -392,9 +390,13 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ ...@@ -392,9 +390,13 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
logs = append(logs, receipt.Logs...) logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) kv = append(kv, receipt.KV...)
var collateralizeID string
coll := &CollateralizeDB{}
if collateralizeIDs == nil {
collateralizeID = common.ToHex(action.txhash)
// 获取借贷配置 // 获取借贷配置
var collcfg *pty.CollateralizeManage var collcfg *pty.CollateralizeManage
cfg, err := getCollateralizeConfig(action.db) cfg, _ := getCollateralizeConfig(action.db)
if cfg == nil { if cfg == nil {
collcfg = &pty.CollateralizeManage{ collcfg = &pty.CollateralizeManage{
DebtCeiling:DefaultDebtCeiling, DebtCeiling:DefaultDebtCeiling,
...@@ -408,7 +410,6 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ ...@@ -408,7 +410,6 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
} }
// 构造coll结构 // 构造coll结构
coll := &CollateralizeDB{}
coll.CollateralizeId = collateralizeID coll.CollateralizeId = collateralizeID
coll.LiquidationRatio = collcfg.LiquidationRatio coll.LiquidationRatio = collcfg.LiquidationRatio
coll.TotalBalance = create.TotalBalance coll.TotalBalance = create.TotalBalance
...@@ -420,7 +421,15 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ ...@@ -420,7 +421,15 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
coll.Status = pty.CollateralizeActionCreate coll.Status = pty.CollateralizeActionCreate
coll.Index = action.GetIndex() coll.Index = action.GetIndex()
coll.CollBalance = 0 coll.CollBalance = 0
} else {
collateralize, err := queryCollateralizeByID(action.db, collateralizeIDs[0])
if err != nil {
clog.Error("CollateralizeCreate.queryCollateralizeByID", "addr", action.fromaddr, "execaddr", action.execaddr, "collId", collateralizeIDs[0])
return nil, err
}
coll.Collateralize = *collateralize
coll.TotalBalance += create.TotalBalance
}
clog.Debug("CollateralizeCreate created", "CollateralizeID", collateralizeID, "TotalBalance", coll.TotalBalance) clog.Debug("CollateralizeCreate created", "CollateralizeID", collateralizeID, "TotalBalance", coll.TotalBalance)
// 保存 // 保存
...@@ -1077,45 +1086,55 @@ func (action *Action) CollateralizeFeed(feed *pty.CollateralizeFeed) (*types.Rec ...@@ -1077,45 +1086,55 @@ func (action *Action) CollateralizeFeed(feed *pty.CollateralizeFeed) (*types.Rec
return receipt, nil return receipt, nil
} }
// CollateralizeClose 终止借 // CollateralizeRetrieve 收回未放
func (action *Action) CollateralizeClose(close *pty.CollateralizeClose) (*types.Receipt, error) { func (action *Action) CollateralizeRetrieve(retrieve *pty.CollateralizeRetrieve) (*types.Receipt, error) {
var logs []*types.ReceiptLog var logs []*types.ReceiptLog
var kv []*types.KeyValue var kv []*types.KeyValue
var receipt *types.Receipt var receipt *types.Receipt
collateralize, err := queryCollateralizeByID(action.db, close.CollateralizeId) collateralize, err := queryCollateralizeByID(action.db, retrieve.CollateralizeId)
if err != nil { if err != nil {
clog.Error("CollateralizeClose", "CollateralizeId", close.CollateralizeId, "err", err) clog.Error("CollateralizeRetrieve", "CollateralizeId", retrieve.CollateralizeId, "err", err)
return nil, err return nil, err
} }
if action.fromaddr != collateralize.CreateAddr { if action.fromaddr != collateralize.CreateAddr {
clog.Error("CollateralizeClose", "CollateralizeId", close.CollateralizeId, "err", "account error", "create", collateralize.CreateAddr, "from", action.fromaddr) clog.Error("CollateralizeRetrieve", "CollateralizeId", retrieve.CollateralizeId, "err", "account error", "create", collateralize.CreateAddr, "from", action.fromaddr)
return nil, pty.ErrPermissionDeny return nil, pty.ErrPermissionDeny
} }
for _, borrowRecord := range collateralize.BorrowRecords { //for _, borrowRecord := range collateralize.BorrowRecords {
if borrowRecord.Status != pty.CollateralizeUserStatusClose { // if borrowRecord.Status != pty.CollateralizeUserStatusClose {
clog.Error("CollateralizeClose", "CollateralizeId", close.CollateralizeId, "addr", action.fromaddr, "execaddr", action.execaddr, "err", pty.ErrCollateralizeRecordNotEmpty) // clog.Error("CollateralizeRetrieve", "CollateralizeId", retrieve.CollateralizeId, "addr", action.fromaddr, "execaddr", action.execaddr, "err", pty.ErrCollateralizeRecordNotEmpty)
return nil, pty.ErrCollateralizeRecordNotEmpty // return nil, pty.ErrCollateralizeRecordNotEmpty
} // }
//}
// 收回金额不能大于待放出金额
if retrieve.Balance > collateralize.Balance {
clog.Error("CollateralizeRetrieve", "CollateralizeId", retrieve.CollateralizeId, "err", "balance error", "retrieve balance", retrieve.Balance, "available balance", collateralize.Balance)
return nil, pty.ErrPermissionDeny
} }
// 解冻ccny // 解冻ccny
receipt, err = action.tokenAccount.ExecActive(action.fromaddr, action.execaddr, collateralize.Balance*Coin) receipt, err = action.tokenAccount.ExecActive(action.fromaddr, action.execaddr, retrieve.Balance*Coin)
if err != nil { if err != nil {
clog.Error("IssuanceClose.ExecActive", "addr", action.fromaddr, "execaddr", action.execaddr, "amount", collateralize.TotalBalance) clog.Error("IssuanceClose.ExecActive", "addr", action.fromaddr, "execaddr", action.execaddr, "balance", retrieve.Balance)
return nil, err return nil, err
} }
logs = append(logs, receipt.Logs...) logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) kv = append(kv, receipt.KV...)
clog.Debug("CollateralizeClose", "ID", close.CollateralizeId) clog.Debug("CollateralizeRetrieve", "ID", retrieve.CollateralizeId, "balance", retrieve.Balance)
coll := &CollateralizeDB{*collateralize} coll := &CollateralizeDB{*collateralize}
coll.Status = pty.CollateralizeStatusClose coll.TotalBalance -= retrieve.Balance
coll.Balance -= retrieve.Balance
if coll.TotalBalance == 0 {
coll.PreIndex = coll.Index coll.PreIndex = coll.Index
coll.Index = action.GetIndex() coll.Index = action.GetIndex()
coll.Status = pty.CollateralizeStatusClose
}
coll.Save(action.db) coll.Save(action.db)
kv = append(kv, coll.GetKVSet()...) kv = append(kv, coll.GetKVSet()...)
......
...@@ -39,10 +39,10 @@ func (c *Collateralize) Exec_Feed(payload *pty.CollateralizeFeed, tx *types.Tran ...@@ -39,10 +39,10 @@ func (c *Collateralize) Exec_Feed(payload *pty.CollateralizeFeed, tx *types.Tran
return actiondb.CollateralizeFeed(payload) return actiondb.CollateralizeFeed(payload)
} }
// Exec_Close Action // Exec_Retrieve Action
func (c *Collateralize) Exec_Close(payload *pty.CollateralizeClose, tx *types.Transaction, index int) (*types.Receipt, error) { func (c *Collateralize) Exec_Retrieve(payload *pty.CollateralizeRetrieve, tx *types.Transaction, index int) (*types.Receipt, error) {
actiondb := NewCollateralizeAction(c, tx, index) actiondb := NewCollateralizeAction(c, tx, index)
return actiondb.CollateralizeClose(payload) return actiondb.CollateralizeRetrieve(payload)
} }
// Exec_Close Action // Exec_Close Action
......
...@@ -13,7 +13,7 @@ func (c *Collateralize) execDelLocal(tx *types.Transaction, receiptData *types.R ...@@ -13,7 +13,7 @@ func (c *Collateralize) execDelLocal(tx *types.Transaction, receiptData *types.R
set := &types.LocalDBSet{} set := &types.LocalDBSet{}
for _, item := range receiptData.Logs { for _, item := range receiptData.Logs {
if item.Ty == pty.TyLogCollateralizeCreate || item.Ty == pty.TyLogCollateralizeBorrow || item.Ty == pty.TyLogCollateralizeAppend || if item.Ty == pty.TyLogCollateralizeCreate || item.Ty == pty.TyLogCollateralizeBorrow || item.Ty == pty.TyLogCollateralizeAppend ||
item.Ty == pty.TyLogCollateralizeRepay || item.Ty == pty.TyLogCollateralizeFeed || item.Ty == pty.TyLogCollateralizeClose { item.Ty == pty.TyLogCollateralizeRepay || item.Ty == pty.TyLogCollateralizeFeed || item.Ty == pty.TyLogCollateralizeRetrieve {
var collateralizeLog pty.ReceiptCollateralize var collateralizeLog pty.ReceiptCollateralize
err := types.Decode(item.Log, &collateralizeLog) err := types.Decode(item.Log, &collateralizeLog)
if err != nil { if err != nil {
...@@ -57,12 +57,14 @@ func (c *Collateralize) execDelLocal(tx *types.Transaction, receiptData *types.R ...@@ -57,12 +57,14 @@ func (c *Collateralize) execDelLocal(tx *types.Transaction, receiptData *types.R
// set.KV = append(set.KV, c.deleteCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.Index)...) // set.KV = append(set.KV, c.deleteCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.Index)...)
//} //}
break break
case pty.TyLogCollateralizeClose: case pty.TyLogCollateralizeRetrieve:
if collateralizeLog.Status == pty.CollateralizeStatusClose {
set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.Status, collateralizeLog.Index)...) set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.Status, collateralizeLog.Index)...)
set.KV = append(set.KV, c.addCollateralizeStatus(pty.CollateralizeStatusCreated, collateralizeLog.CollateralizeId, set.KV = append(set.KV, c.addCollateralizeStatus(pty.CollateralizeStatusCreated, collateralizeLog.CollateralizeId,
collateralizeLog.PreIndex)...) collateralizeLog.PreIndex)...)
//set.KV = append(set.KV, c.addCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.CollateralizeId, //set.KV = append(set.KV, c.addCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.CollateralizeId,
// collateralizeLog.PreStatus, collateralizeLog.PreIndex)...) // collateralizeLog.PreStatus, collateralizeLog.PreIndex)...)
}
break break
} }
} }
...@@ -96,8 +98,8 @@ func (c *Collateralize) ExecDelLocal_Feed(payload *pty.CollateralizeFeed, tx *ty ...@@ -96,8 +98,8 @@ func (c *Collateralize) ExecDelLocal_Feed(payload *pty.CollateralizeFeed, tx *ty
return c.execDelLocal(tx, receiptData) return c.execDelLocal(tx, receiptData)
} }
// ExecDelLocal_Close Action // ExecDelLocal_Retrieve Action
func (c *Collateralize) ExecDelLocal_Close(payload *pty.CollateralizeClose, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) { func (c *Collateralize) ExecDelLocal_Retrieve(payload *pty.CollateralizeRetrieve, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
return c.execDelLocal(tx, receiptData) return c.execDelLocal(tx, receiptData)
} }
......
...@@ -14,7 +14,7 @@ func (c *Collateralize) execLocal(tx *types.Transaction, receipt *types.ReceiptD ...@@ -14,7 +14,7 @@ func (c *Collateralize) execLocal(tx *types.Transaction, receipt *types.ReceiptD
set := &types.LocalDBSet{} set := &types.LocalDBSet{}
for _, item := range receipt.Logs { for _, item := range receipt.Logs {
if item.Ty == pty.TyLogCollateralizeCreate || item.Ty == pty.TyLogCollateralizeBorrow || item.Ty == pty.TyLogCollateralizeAppend || if item.Ty == pty.TyLogCollateralizeCreate || item.Ty == pty.TyLogCollateralizeBorrow || item.Ty == pty.TyLogCollateralizeAppend ||
item.Ty == pty.TyLogCollateralizeRepay || item.Ty == pty.TyLogCollateralizeFeed || item.Ty == pty.TyLogCollateralizeClose { item.Ty == pty.TyLogCollateralizeRepay || item.Ty == pty.TyLogCollateralizeFeed || item.Ty == pty.TyLogCollateralizeRetrieve {
var collateralizeLog pty.ReceiptCollateralize var collateralizeLog pty.ReceiptCollateralize
err := types.Decode(item.Log, &collateralizeLog) err := types.Decode(item.Log, &collateralizeLog)
if err != nil { if err != nil {
...@@ -59,10 +59,12 @@ func (c *Collateralize) execLocal(tx *types.Transaction, receipt *types.ReceiptD ...@@ -59,10 +59,12 @@ func (c *Collateralize) execLocal(tx *types.Transaction, receipt *types.ReceiptD
// collateralizeLog.RecordId, collateralizeLog.Index)...) // collateralizeLog.RecordId, collateralizeLog.Index)...)
//} //}
break break
case pty.TyLogCollateralizeClose: case pty.TyLogCollateralizeRetrieve:
if collateralizeLog.Status == pty.CollateralizeStatusClose {
set.KV = append(set.KV, c.addCollateralizeStatus(collateralizeLog.Status, collateralizeLog.CollateralizeId, collateralizeLog.Index)...) set.KV = append(set.KV, c.addCollateralizeStatus(collateralizeLog.Status, collateralizeLog.CollateralizeId, collateralizeLog.Index)...)
set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.PreStatus, collateralizeLog.PreIndex)...) set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.PreStatus, collateralizeLog.PreIndex)...)
//set.KV = append(set.KV, c.deleteCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.PreIndex)...) //set.KV = append(set.KV, c.deleteCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.PreIndex)...)
}
break break
} }
} }
...@@ -95,8 +97,8 @@ func (c *Collateralize) ExecLocal_Feed(payload *pty.CollateralizeFeed, tx *types ...@@ -95,8 +97,8 @@ func (c *Collateralize) ExecLocal_Feed(payload *pty.CollateralizeFeed, tx *types
return c.execLocal(tx, receiptData) return c.execLocal(tx, receiptData)
} }
// ExecLocal_Close Action // ExecLocal_Retrieve Action
func (c *Collateralize) ExecLocal_Close(payload *pty.CollateralizeClose, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) { func (c *Collateralize) ExecLocal_Retrieve(payload *pty.CollateralizeRetrieve, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error) {
return c.execLocal(tx, receiptData) return c.execLocal(tx, receiptData)
} }
......
...@@ -56,7 +56,7 @@ message CollateralizeAction { ...@@ -56,7 +56,7 @@ message CollateralizeAction {
CollateralizeRepay repay = 3; //清算 CollateralizeRepay repay = 3; //清算
CollateralizeAppend append = 4; //追加 CollateralizeAppend append = 4; //追加
CollateralizeFeed feed = 5; //喂价 CollateralizeFeed feed = 5; //喂价
CollateralizeClose close = 6; //关闭 CollateralizeRetrieve retrieve = 6; //收回
CollateralizeManage manage = 7; //全局配置 CollateralizeManage manage = 7; //全局配置
} }
int32 ty = 10; int32 ty = 10;
...@@ -105,9 +105,10 @@ message CollateralizeFeed { ...@@ -105,9 +105,10 @@ message CollateralizeFeed {
repeated int64 volume = 3; //成交量 repeated int64 volume = 3; //成交量
} }
// 放贷关闭 // 收回
message CollateralizeClose { message CollateralizeRetrieve {
string collateralizeId = 1; //借贷期数ID string collateralizeId = 1; //借贷期数ID
int64 balance = 2; //收回金额
} }
// exec_local 放贷信息 // exec_local 放贷信息
......
...@@ -57,7 +57,7 @@ func (collateralize *CollateralizeType) GetLogMap() map[int64]*types.LogInfo { ...@@ -57,7 +57,7 @@ func (collateralize *CollateralizeType) GetLogMap() map[int64]*types.LogInfo {
TyLogCollateralizeRepay: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeRepay"}, TyLogCollateralizeRepay: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeRepay"},
TyLogCollateralizeAppend: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeAppend"}, TyLogCollateralizeAppend: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeAppend"},
TyLogCollateralizeFeed: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeFeed"}, TyLogCollateralizeFeed: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeFeed"},
TyLogCollateralizeClose: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeClose"}, TyLogCollateralizeRetrieve: {Ty: reflect.TypeOf(ReceiptCollateralize{}), Name: "LogCollateralizeRetrieve"},
} }
} }
...@@ -111,14 +111,14 @@ func (collateralize CollateralizeType) CreateTx(action string, message json.RawM ...@@ -111,14 +111,14 @@ func (collateralize CollateralizeType) CreateTx(action string, message json.RawM
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
return CreateRawCollateralizeFeedTx(cfg, &param) return CreateRawCollateralizeFeedTx(cfg, &param)
} else if action == "CollateralizeClose" { } else if action == "CollateralizeRetrive" {
var param CollateralizeCloseTx var param CollateralizeRetrieveTx
err := json.Unmarshal(message, &param) err := json.Unmarshal(message, &param)
if err != nil { if err != nil {
llog.Error("CreateTx", "Error", err) llog.Error("CreateTx", "Error", err)
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
return CreateRawCollateralizeCloseTx(cfg, &param) return CreateRawCollateralizeRetrieveTx(cfg, &param)
} else if action == "CollateralizeManage" { } else if action == "CollateralizeManage" {
var param CollateralizeManageTx var param CollateralizeManageTx
err := json.Unmarshal(message, &param) err := json.Unmarshal(message, &param)
...@@ -140,7 +140,7 @@ func (collateralize CollateralizeType) GetTypeMap() map[string]int32 { ...@@ -140,7 +140,7 @@ func (collateralize CollateralizeType) GetTypeMap() map[string]int32 {
"Repay": CollateralizeActionRepay, "Repay": CollateralizeActionRepay,
"Append": CollateralizeActionAppend, "Append": CollateralizeActionAppend,
"Feed": CollateralizeActionFeed, "Feed": CollateralizeActionFeed,
"Close": CollateralizeActionClose, "Retrieve": CollateralizeActionRetrieve,
"Manage": CollateralizeActionManage, "Manage": CollateralizeActionManage,
} }
} }
...@@ -290,19 +290,20 @@ func CreateRawCollateralizeFeedTx(cfg *types.Chain33Config, parm *CollateralizeF ...@@ -290,19 +290,20 @@ func CreateRawCollateralizeFeedTx(cfg *types.Chain33Config, parm *CollateralizeF
return tx, nil return tx, nil
} }
// CreateRawCollateralizeCloseTx method // CreateRawCollateralizeRetrieveTx method
func CreateRawCollateralizeCloseTx(cfg *types.Chain33Config, parm *CollateralizeCloseTx) (*types.Transaction, error) { func CreateRawCollateralizeRetrieveTx(cfg *types.Chain33Config, parm *CollateralizeRetrieveTx) (*types.Transaction, error) {
if parm == nil { if parm == nil {
llog.Error("CreateRawCollateralizeCloseTx", "parm", parm) llog.Error("CreateRawCollateralizeCloseTx", "parm", parm)
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
v := &CollateralizeClose{ v := &CollateralizeRetrieve{
CollateralizeId: parm.CollateralizeID, CollateralizeId: parm.CollateralizeID,
Balance: parm.Balance,
} }
close := &CollateralizeAction{ close := &CollateralizeAction{
Ty: CollateralizeActionClose, Ty: CollateralizeActionRetrieve,
Value: &CollateralizeAction_Close{v}, Value: &CollateralizeAction_Retrieve{v},
} }
tx := &types.Transaction{ tx := &types.Transaction{
Execer: []byte(cfg.ExecName(CollateralizeX)), Execer: []byte(cfg.ExecName(CollateralizeX)),
......
...@@ -396,7 +396,7 @@ type CollateralizeAction struct { ...@@ -396,7 +396,7 @@ type CollateralizeAction struct {
// *CollateralizeAction_Repay // *CollateralizeAction_Repay
// *CollateralizeAction_Append // *CollateralizeAction_Append
// *CollateralizeAction_Feed // *CollateralizeAction_Feed
// *CollateralizeAction_Close // *CollateralizeAction_Retrieve
// *CollateralizeAction_Manage // *CollateralizeAction_Manage
Value isCollateralizeAction_Value `protobuf_oneof:"value"` Value isCollateralizeAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"` Ty int32 `protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"`
...@@ -454,8 +454,8 @@ type CollateralizeAction_Feed struct { ...@@ -454,8 +454,8 @@ type CollateralizeAction_Feed struct {
Feed *CollateralizeFeed `protobuf:"bytes,5,opt,name=feed,proto3,oneof"` Feed *CollateralizeFeed `protobuf:"bytes,5,opt,name=feed,proto3,oneof"`
} }
type CollateralizeAction_Close struct { type CollateralizeAction_Retrieve struct {
Close *CollateralizeClose `protobuf:"bytes,6,opt,name=close,proto3,oneof"` Retrieve *CollateralizeRetrieve `protobuf:"bytes,6,opt,name=retrieve,proto3,oneof"`
} }
type CollateralizeAction_Manage struct { type CollateralizeAction_Manage struct {
...@@ -472,7 +472,7 @@ func (*CollateralizeAction_Append) isCollateralizeAction_Value() {} ...@@ -472,7 +472,7 @@ func (*CollateralizeAction_Append) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Feed) isCollateralizeAction_Value() {} func (*CollateralizeAction_Feed) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Close) isCollateralizeAction_Value() {} func (*CollateralizeAction_Retrieve) isCollateralizeAction_Value() {}
func (*CollateralizeAction_Manage) isCollateralizeAction_Value() {} func (*CollateralizeAction_Manage) isCollateralizeAction_Value() {}
...@@ -518,9 +518,9 @@ func (m *CollateralizeAction) GetFeed() *CollateralizeFeed { ...@@ -518,9 +518,9 @@ func (m *CollateralizeAction) GetFeed() *CollateralizeFeed {
return nil return nil
} }
func (m *CollateralizeAction) GetClose() *CollateralizeClose { func (m *CollateralizeAction) GetRetrieve() *CollateralizeRetrieve {
if x, ok := m.GetValue().(*CollateralizeAction_Close); ok { if x, ok := m.GetValue().(*CollateralizeAction_Retrieve); ok {
return x.Close return x.Retrieve
} }
return nil return nil
} }
...@@ -547,7 +547,7 @@ func (*CollateralizeAction) XXX_OneofWrappers() []interface{} { ...@@ -547,7 +547,7 @@ func (*CollateralizeAction) XXX_OneofWrappers() []interface{} {
(*CollateralizeAction_Repay)(nil), (*CollateralizeAction_Repay)(nil),
(*CollateralizeAction_Append)(nil), (*CollateralizeAction_Append)(nil),
(*CollateralizeAction_Feed)(nil), (*CollateralizeAction_Feed)(nil),
(*CollateralizeAction_Close)(nil), (*CollateralizeAction_Retrieve)(nil),
(*CollateralizeAction_Manage)(nil), (*CollateralizeAction_Manage)(nil),
} }
} }
...@@ -918,46 +918,54 @@ func (m *CollateralizeFeed) GetVolume() []int64 { ...@@ -918,46 +918,54 @@ func (m *CollateralizeFeed) GetVolume() []int64 {
return nil return nil
} }
// 放贷关闭 // 收回
type CollateralizeClose struct { type CollateralizeRetrieve struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"` CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Balance int64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
} }
func (m *CollateralizeClose) Reset() { *m = CollateralizeClose{} } func (m *CollateralizeRetrieve) Reset() { *m = CollateralizeRetrieve{} }
func (m *CollateralizeClose) String() string { return proto.CompactTextString(m) } func (m *CollateralizeRetrieve) String() string { return proto.CompactTextString(m) }
func (*CollateralizeClose) ProtoMessage() {} func (*CollateralizeRetrieve) ProtoMessage() {}
func (*CollateralizeClose) Descriptor() ([]byte, []int) { func (*CollateralizeRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{11} return fileDescriptor_a988fb4a61381972, []int{11}
} }
func (m *CollateralizeClose) XXX_Unmarshal(b []byte) error { func (m *CollateralizeRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CollateralizeClose.Unmarshal(m, b) return xxx_messageInfo_CollateralizeRetrieve.Unmarshal(m, b)
} }
func (m *CollateralizeClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *CollateralizeRetrieve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CollateralizeClose.Marshal(b, m, deterministic) return xxx_messageInfo_CollateralizeRetrieve.Marshal(b, m, deterministic)
} }
func (m *CollateralizeClose) XXX_Merge(src proto.Message) { func (m *CollateralizeRetrieve) XXX_Merge(src proto.Message) {
xxx_messageInfo_CollateralizeClose.Merge(m, src) xxx_messageInfo_CollateralizeRetrieve.Merge(m, src)
} }
func (m *CollateralizeClose) XXX_Size() int { func (m *CollateralizeRetrieve) XXX_Size() int {
return xxx_messageInfo_CollateralizeClose.Size(m) return xxx_messageInfo_CollateralizeRetrieve.Size(m)
} }
func (m *CollateralizeClose) XXX_DiscardUnknown() { func (m *CollateralizeRetrieve) XXX_DiscardUnknown() {
xxx_messageInfo_CollateralizeClose.DiscardUnknown(m) xxx_messageInfo_CollateralizeRetrieve.DiscardUnknown(m)
} }
var xxx_messageInfo_CollateralizeClose proto.InternalMessageInfo var xxx_messageInfo_CollateralizeRetrieve proto.InternalMessageInfo
func (m *CollateralizeClose) GetCollateralizeId() string { func (m *CollateralizeRetrieve) GetCollateralizeId() string {
if m != nil { if m != nil {
return m.CollateralizeId return m.CollateralizeId
} }
return "" return ""
} }
func (m *CollateralizeRetrieve) GetBalance() int64 {
if m != nil {
return m.Balance
}
return 0
}
// exec_local 放贷信息 // exec_local 放贷信息
type ReceiptCollateralize struct { type ReceiptCollateralize struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"` CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
...@@ -1938,7 +1946,7 @@ func init() { ...@@ -1938,7 +1946,7 @@ func init() {
proto.RegisterType((*CollateralizeRepay)(nil), "types.CollateralizeRepay") proto.RegisterType((*CollateralizeRepay)(nil), "types.CollateralizeRepay")
proto.RegisterType((*CollateralizeAppend)(nil), "types.CollateralizeAppend") proto.RegisterType((*CollateralizeAppend)(nil), "types.CollateralizeAppend")
proto.RegisterType((*CollateralizeFeed)(nil), "types.CollateralizeFeed") proto.RegisterType((*CollateralizeFeed)(nil), "types.CollateralizeFeed")
proto.RegisterType((*CollateralizeClose)(nil), "types.CollateralizeClose") proto.RegisterType((*CollateralizeRetrieve)(nil), "types.CollateralizeRetrieve")
proto.RegisterType((*ReceiptCollateralize)(nil), "types.ReceiptCollateralize") proto.RegisterType((*ReceiptCollateralize)(nil), "types.ReceiptCollateralize")
proto.RegisterType((*CollateralizeRecord)(nil), "types.CollateralizeRecord") proto.RegisterType((*CollateralizeRecord)(nil), "types.CollateralizeRecord")
proto.RegisterType((*CollateralizeRecords)(nil), "types.CollateralizeRecords") proto.RegisterType((*CollateralizeRecords)(nil), "types.CollateralizeRecords")
...@@ -1961,84 +1969,85 @@ func init() { ...@@ -1961,84 +1969,85 @@ func init() {
func init() { proto.RegisterFile("collateralize.proto", fileDescriptor_a988fb4a61381972) } func init() { proto.RegisterFile("collateralize.proto", fileDescriptor_a988fb4a61381972) }
var fileDescriptor_a988fb4a61381972 = []byte{ var fileDescriptor_a988fb4a61381972 = []byte{
// 1257 bytes of a gzipped FileDescriptorProto // 1270 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xdd, 0x6e, 0xdc, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4d, 0x6f, 0xdc, 0x44,
0x14, 0xae, 0xed, 0xfd, 0xc9, 0x9e, 0x4d, 0xd2, 0x74, 0x12, 0x8a, 0x09, 0x51, 0xb4, 0xb2, 0x90, 0x18, 0xae, 0xed, 0xfd, 0xc8, 0xbe, 0x9b, 0xa4, 0xe9, 0x24, 0x0d, 0x26, 0x44, 0xd1, 0x6a, 0x84,
0x58, 0x01, 0x8d, 0x44, 0x5a, 0x21, 0x2a, 0x24, 0x44, 0xb2, 0x6d, 0x95, 0x95, 0x8a, 0x54, 0x99, 0xc4, 0x0a, 0x68, 0x24, 0xd2, 0x0a, 0x51, 0xb8, 0x90, 0xa4, 0xad, 0xb2, 0x52, 0x91, 0x2a, 0x53,
0x82, 0x50, 0x25, 0x90, 0xbc, 0xf6, 0x24, 0x58, 0x72, 0xd6, 0x8e, 0x3d, 0x1b, 0xb2, 0xdc, 0xd3, 0x10, 0x2a, 0x02, 0xc9, 0xbb, 0x9e, 0x04, 0x4b, 0x8e, 0xed, 0xd8, 0xb3, 0x21, 0xcb, 0x9d, 0x1e,
0x0b, 0x9e, 0xa1, 0xbc, 0x02, 0xcf, 0xc4, 0x3b, 0x70, 0xc1, 0x2d, 0x9a, 0x33, 0xe3, 0x9f, 0x19, 0xf8, 0x0d, 0x70, 0xe4, 0xca, 0x6f, 0xe2, 0x3f,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59, 0xb8, 0x1a, 0x49, 0x5c, 0x56, 0xac,
0x26, 0x4d, 0xc9, 0xc7, 0xd0, 0x13, 0x28, 0x39, 0xed, 0x37, 0xea, 0x29, 0x21, 0xce, 0x1b, 0xb3, 0xef, 0xeb, 0x51, 0x5d, 0xb9, 0x42, 0xdf, 0x36, 0x4c, 0x3c, 0x65, 0xf7, 0x37, 0x69, 0x8a, 0x3e,
0x7e, 0xcf, 0x24, 0x9e, 0x9f, 0x87, 0x17, 0x6f, 0xc5, 0x58, 0x5a, 0xa9, 0x4e, 0xbd, 0x7a, 0x75, 0x80, 0x9e, 0x40, 0xc9, 0x6f, 0x82, 0x46, 0x3d, 0x25, 0x04, 0xff, 0x6a, 0xd7, 0xef, 0x39, 0x4d,
0xd2, 0x06, 0xd7, 0x7e, 0x7d, 0x70, 0x7d, 0xc0, 0x8b, 0x90, 0xea, 0x1d, 0xf1, 0x19, 0x56, 0x4c, 0xe2, 0xf3, 0xf0, 0xe2, 0x8d, 0x98, 0x59, 0x95, 0xea, 0xd4, 0xab, 0x57, 0x27, 0x63, 0xaa, 0xed,
0x3d, 0x06, 0x9a, 0x20, 0x16, 0xb3, 0x1e, 0xfe, 0xc3, 0xe9, 0xe1, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xd7, 0xa7, 0xda, 0x07, 0xac, 0x08, 0xe9, 0xde, 0x11, 0x1f, 0x6b, 0xe5, 0x48, 0x64, 0x71, 0x13,
0xff, 0x18, 0xd7, 0xbc, 0xeb, 0x87, 0x12, 0x00, 0x00, 0xc4, 0x62, 0xda, 0xe3, 0xff, 0x96, 0x7a, 0xf8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x82, 0xe9,
0x7d, 0xb9, 0xad, 0x12, 0x00, 0x00,
} }
...@@ -39,9 +39,10 @@ type CollateralizeFeedTx struct { ...@@ -39,9 +39,10 @@ type CollateralizeFeedTx struct {
Fee int64 `json:"fee"` Fee int64 `json:"fee"`
} }
// CollateralizeCloseTx for construction // CollateralizeRetrieveTx for construction
type CollateralizeCloseTx struct { type CollateralizeRetrieveTx struct {
CollateralizeID string `json:"collateralizeId"` CollateralizeID string `json:"collateralizeId"`
Balance int64 `json:"Balance"`
Fee int64 `json:"fee"` Fee int64 `json:"fee"`
} }
......
...@@ -11,7 +11,7 @@ const ( ...@@ -11,7 +11,7 @@ const (
CollateralizeActionRepay CollateralizeActionRepay
CollateralizeActionAppend CollateralizeActionAppend
CollateralizeActionFeed CollateralizeActionFeed
CollateralizeActionClose CollateralizeActionRetrieve
CollateralizeActionManage CollateralizeActionManage
//log for Collateralize //log for Collateralize
...@@ -20,7 +20,7 @@ const ( ...@@ -20,7 +20,7 @@ const (
TyLogCollateralizeRepay = 733 TyLogCollateralizeRepay = 733
TyLogCollateralizeAppend = 734 TyLogCollateralizeAppend = 734
TyLogCollateralizeFeed = 735 TyLogCollateralizeFeed = 735
TyLogCollateralizeClose = 736 TyLogCollateralizeRetrieve = 736
) )
// Collateralize name // Collateralize name
......
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