Commit adb27358 authored by pengjun's avatar pengjun

#627 update issuance & collateralize

parent 550958aa
......@@ -284,6 +284,7 @@ func addCollateralizeQueryFlags(cmd *cobra.Command) {
cmd.Flags().StringP("index", "i", "", "index")
cmd.Flags().StringP("status", "s", "", "status")
cmd.Flags().StringP("collateralizeIDs", "d", "", "collateralize IDs")
cmd.Flags().StringP("borrowID", "b", "", "borrow ID")
}
func CollateralizeQuery(cmd *cobra.Command, args []string) {
......@@ -293,6 +294,7 @@ func CollateralizeQuery(cmd *cobra.Command, args []string) {
statusStr, _ := cmd.Flags().GetString("status")
// indexstr, _ := cmd.Flags().GetString("index")
collateralizeIDs, _ := cmd.Flags().GetString("collateralizeIDs")
borrowID, _ := cmd.Flags().GetString("borrowID")
var params rpctypes.Query4Jrpc
params.Execer = pkt.CollateralizeX
......@@ -315,25 +317,36 @@ func CollateralizeQuery(cmd *cobra.Command, args []string) {
if collateralizeID != "" {
if statusStr != "" {
params.FuncName = "CollateralizeBorrowInfoByStatus"
params.FuncName = "CollateralizeRecordByStatus"
req := &pkt.ReqCollateralizeBorrowInfoByStatus{
req := &pkt.ReqCollateralizeRecordByStatus{
CollateralizeId: collateralizeID,
Status: int32(status),
}
params.Payload = types.MustPBToJSON(req)
var res pkt.RepCollateralizeBorrowInfos
var res pkt.RepCollateralizeRecords
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run()
} else if address != "" {
params.FuncName = "CollateralizeBorrowInfoByAddr"
params.FuncName = "CollateralizeRecordByAddr"
req := &pkt.ReqCollateralizeBorrowInfoByAddr{
req := &pkt.ReqCollateralizeRecordByAddr{
CollateralizeId: collateralizeID,
Addr: address,
}
params.Payload = types.MustPBToJSON(req)
var res pkt.RepCollateralizeBorrowInfos
var res pkt.RepCollateralizeRecords
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run()
} else if borrowID != ""{
params.FuncName = "CollateralizeRecordByID"
req := &pkt.ReqCollateralizeRecord{
CollateralizeId: collateralizeID,
RecordId: borrowID,
}
params.Payload = types.MustPBToJSON(req)
var res pkt.RepCollateralizeRecord
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run()
} else {
......
......@@ -59,11 +59,11 @@ func (c *Collateralize) GetDriverName() string {
return pty.CollateralizeX
}
func (c *Collateralize) addCollateralizeID(collateralizelog *pty.ReceiptCollateralize) (kvs []*types.KeyValue) {
key := calcCollateralizeKey(collateralizelog.CollateralizeId, collateralizelog.Index)
func (c *Collateralize) addCollateralizeID(collateralizeId string, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeKey(collateralizeId, index)
record := &pty.CollateralizeRecord{
CollateralizeId:collateralizelog.CollateralizeId,
Index: collateralizelog.Index,
CollateralizeId:collateralizeId,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
......@@ -71,19 +71,19 @@ func (c *Collateralize) addCollateralizeID(collateralizelog *pty.ReceiptCollater
return kvs
}
func (c *Collateralize) deleteCollateralizeID(collateralizelog *pty.ReceiptCollateralize) (kvs []*types.KeyValue) {
key := calcCollateralizeKey(collateralizelog.CollateralizeId, collateralizelog.Index)
func (c *Collateralize) deleteCollateralizeID(collateralizeId string, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeKey(collateralizeId, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
return kvs
}
func (c *Collateralize) addCollateralizeStatus(collateralizelog *pty.ReceiptCollateralize) (kvs []*types.KeyValue) {
key := calcCollateralizeStatusKey(collateralizelog.Status, collateralizelog.Index)
func (c *Collateralize) addCollateralizeStatus(status int32, collateralizeId string, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeStatusKey(status, index)
record := &pty.CollateralizeRecord{
CollateralizeId:collateralizelog.CollateralizeId,
Index: collateralizelog.Index,
CollateralizeId:collateralizeId,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
......@@ -91,19 +91,19 @@ func (c *Collateralize) addCollateralizeStatus(collateralizelog *pty.ReceiptColl
return kvs
}
func (c *Collateralize) deleteCollateralizeStatus(collateralizelog *pty.ReceiptCollateralize) (kvs []*types.KeyValue) {
key := calcCollateralizeStatusKey(collateralizelog.Status, collateralizelog.Index)
func (c *Collateralize) deleteCollateralizeStatus(status int32, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeStatusKey(status, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
return kvs
}
func (c *Collateralize) addCollateralizeAddr(collateralizelog *pty.ReceiptCollateralize) (kvs []*types.KeyValue) {
key := calcCollateralizeAddrKey(collateralizelog.AccountAddr, collateralizelog.Index)
func (c *Collateralize) addCollateralizeAddr(addr string, collateralizeId string, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeAddrKey(addr, index)
record := &pty.CollateralizeRecord{
CollateralizeId:collateralizelog.CollateralizeId,
Index: collateralizelog.Index,
CollateralizeId:collateralizeId,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
......@@ -111,21 +111,21 @@ func (c *Collateralize) addCollateralizeAddr(collateralizelog *pty.ReceiptCollat
return kvs
}
func (c *Collateralize) deleteCollateralizeAddr(collateralizelog *pty.ReceiptCollateralize) (kvs []*types.KeyValue) {
key := calcCollateralizeAddrKey(collateralizelog.AccountAddr, collateralizelog.Index)
func (c *Collateralize) deleteCollateralizeAddr(addr string, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeAddrKey(addr, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
return kvs
}
func (c *Collateralize) addCollateralizeRecordStatus(collateralizelog *pty.ReceiptCollateralize) (kvs []*types.KeyValue) {
key := calcCollateralizeRecordStatusKey(collateralizelog.RecordStatus, collateralizelog.Index)
func (c *Collateralize) addCollateralizeRecordStatus(recordStatus int32, collateralizeId string, recordId string, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeRecordStatusKey(recordStatus, index)
record := &pty.CollateralizeRecord{
CollateralizeId:collateralizelog.CollateralizeId,
Addr: collateralizelog.AccountAddr,
Index: collateralizelog.Index,
CollateralizeId:collateralizeId,
RecordId:recordId,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
......@@ -133,8 +133,30 @@ func (c *Collateralize) addCollateralizeRecordStatus(collateralizelog *pty.Recei
return kvs
}
func (c *Collateralize) deleteCollateralizeRecordStatus(collateralizelog *pty.ReceiptCollateralize) (kvs []*types.KeyValue) {
key := calcCollateralizeRecordStatusKey(collateralizelog.RecordStatus, collateralizelog.Index)
func (c *Collateralize) deleteCollateralizeRecordStatus(recordStatus int32, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeRecordStatusKey(recordStatus, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
return kvs
}
func (c *Collateralize) addCollateralizeRecordAddr(recordAddr string, collateralizeId string, recordId string, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeRecordAddrKey(recordAddr, index)
record := &pty.CollateralizeRecord{
CollateralizeId:collateralizeId,
RecordId:recordId,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
kvs = append(kvs, kv)
return kvs
}
func (c *Collateralize) deleteCollateralizeRecordAddr(recordAddr string, index int64) (kvs []*types.KeyValue) {
key := calcCollateralizeRecordAddrKey(recordAddr, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
......
......@@ -105,21 +105,21 @@ func NewCollateralizeAction(c *Collateralize, tx *types.Transaction, index int)
}
// GetCollCommonRecipt generate logs for Collateralize common action
func (action *Action) GetCollCommonRecipt(collateralize *pty.Collateralize, preStatus int32) *pty.ReceiptCollateralize {
func (action *Action) GetCollCommonRecipt(collateralize *pty.Collateralize) *pty.ReceiptCollateralize {
c := &pty.ReceiptCollateralize{}
c.CollateralizeId = collateralize.CollateralizeId
c.PreStatus = preStatus
c.Status = collateralize.Status
c.Index = action.GetIndex()
c.PreIndex = collateralize.PreIndex
c.Index = collateralize.Index
return c
}
// GetCreateReceiptLog generate logs for Collateralize create action
func (action *Action) GetCreateReceiptLog(collateralize *pty.Collateralize, preStatus int32) *types.ReceiptLog {
func (action *Action) GetCreateReceiptLog(collateralize *pty.Collateralize) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogCollateralizeCreate
c := action.GetCollCommonRecipt(collateralize, preStatus)
c := action.GetCollCommonRecipt(collateralize)
c.CreateAddr = action.fromaddr
log.Log = types.Encode(c)
......@@ -128,12 +128,14 @@ func (action *Action) GetCreateReceiptLog(collateralize *pty.Collateralize, preS
}
// GetBorrowReceiptLog generate logs for Collateralize borrow action
func (action *Action) GetBorrowReceiptLog(collateralize *pty.Collateralize, preStatus int32) *types.ReceiptLog {
func (action *Action) GetBorrowReceiptLog(collateralize *pty.Collateralize, record *pty.BorrowRecord) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogCollateralizeBorrow
c := action.GetCollCommonRecipt(collateralize, preStatus)
c := action.GetCollCommonRecipt(collateralize)
c.AccountAddr = action.fromaddr
c.RecordId = record.RecordId
c.RecordStatus = record.Status
log.Log = types.Encode(c)
......@@ -141,11 +143,15 @@ func (action *Action) GetBorrowReceiptLog(collateralize *pty.Collateralize, preS
}
// GetRepayReceiptLog generate logs for Collateralize Repay action
func (action *Action) GetRepayReceiptLog(collateralize *pty.Collateralize, preStatus int32) *types.ReceiptLog {
func (action *Action) GetRepayReceiptLog(collateralize *pty.Collateralize, record *pty.BorrowRecord) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogCollateralizeRepay
c := action.GetCollCommonRecipt(collateralize, preStatus)
c := action.GetCollCommonRecipt(collateralize)
c.AccountAddr = action.fromaddr
c.RecordId = record.RecordId
c.RecordStatus = record.Status
c.RecordPreStatus = record.PreStatus
log.Log = types.Encode(c)
......@@ -153,11 +159,11 @@ func (action *Action) GetRepayReceiptLog(collateralize *pty.Collateralize, preSt
}
// GetAppendReceiptLog generate logs for Collateralize append action
func (action *Action) GetAppendReceiptLog(collateralize *pty.Collateralize, preStatus int32) *types.ReceiptLog {
func (action *Action) GetAppendReceiptLog(collateralize *pty.Collateralize) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogCollateralizeAppend
c := action.GetCollCommonRecipt(collateralize, preStatus)
c := action.GetCollCommonRecipt(collateralize)
log.Log = types.Encode(c)
......@@ -165,13 +171,15 @@ func (action *Action) GetAppendReceiptLog(collateralize *pty.Collateralize, preS
}
// GetFeedReceiptLog generate logs for Collateralize price feed action
func (action *Action) GetFeedReceiptLog(collateralize *pty.Collateralize, borrowRecord *pty.BorrowRecord) *types.ReceiptLog {
func (action *Action) GetFeedReceiptLog(collateralize *pty.Collateralize, record *pty.BorrowRecord) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogCollateralizeFeed
c := action.GetCollCommonRecipt(collateralize, borrowRecord.PreStatus)
c.AccountAddr = borrowRecord.AccountAddr
c.RecordStatus = borrowRecord.Status
c := action.GetCollCommonRecipt(collateralize)
c.AccountAddr = record.AccountAddr
c.RecordId = record.RecordId
c.RecordStatus = record.Status
c.RecordPreStatus = record.PreStatus
log.Log = types.Encode(c)
......@@ -179,11 +187,11 @@ func (action *Action) GetFeedReceiptLog(collateralize *pty.Collateralize, borrow
}
// GetCloseReceiptLog generate logs for Collateralize close action
func (action *Action) GetCloseReceiptLog(Collateralize *pty.Collateralize, preStatus int32) *types.ReceiptLog {
func (action *Action) GetCloseReceiptLog(Collateralize *pty.Collateralize) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogCollateralizeClose
c := action.GetCollCommonRecipt(Collateralize, preStatus)
c := action.GetCollCommonRecipt(Collateralize)
log.Log = types.Encode(c)
......@@ -352,6 +360,8 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
coll.Balance = create.TotalBalance
coll.CreateAddr = action.fromaddr
coll.Status = pty.CollateralizeActionCreate
coll.Index = action.GetIndex()
coll.CreateIndex = coll.Index
clog.Debug("CollateralizeCreate created", "CollateralizeID", collateralizeID, "TotalBalance", coll.TotalBalance)
......@@ -359,7 +369,7 @@ func (action *Action) CollateralizeCreate(create *pty.CollateralizeCreate) (*typ
coll.Save(action.db)
kv = append(kv, coll.GetKVSet()...)
receiptLog := action.GetCreateReceiptLog(&coll.Collateralize, 0)
receiptLog := action.GetCreateReceiptLog(&coll.Collateralize)
logs = append(logs, receiptLog)
receipt = &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}
......@@ -440,7 +450,6 @@ func (action *Action) CheckExecTokenAccount(addr string, amount int64, isFrozen
}
// CollateralizeBorrow 用户质押bty借出ccny
// TODO 考虑同一用户多次借贷的场景
func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*types.Receipt, error) {
var logs []*types.ReceiptLog
var kv []*types.KeyValue
......@@ -458,16 +467,7 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
return nil, pty.ErrCollateralizeStatus
}
// 一个地址在一期借贷中只允许借出一次
for _, record := range collateralize.BorrowRecords {
if record.AccountAddr == action.fromaddr {
clog.Error("CollateralizeBorrow","CollateralizeId", borrow.CollateralizeId, action.fromaddr, "execaddr", action.execaddr, "err", pty.ErrCollateralizeAccountExist)
return nil, err
}
}
coll := &CollateralizeDB{*collateralize}
preStatus := coll.Status
// 借贷金额检查
if borrow.GetValue() <= 0 {
clog.Error("CollateralizeBorrow", "CollID", coll.CollateralizeId, "addr", action.fromaddr, "execaddr", action.execaddr, "borrow value", borrow.GetValue(), "err", types.ErrInvalidParam)
......@@ -536,6 +536,7 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
// 构造借出记录
borrowRecord := &pty.BorrowRecord{}
borrowRecord.RecordId = common.ToHex(action.txhash)
borrowRecord.AccountAddr = action.fromaddr
borrowRecord.CollateralValue = btyFrozen
borrowRecord.StartTime = action.blocktime
......@@ -554,10 +555,12 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
coll.BorrowRecords = append(coll.BorrowRecords, borrowRecord)
coll.Status = pty.CollateralizeStatusCreated
coll.Balance -= borrow.Value
coll.PreIndex = coll.Index
coll.Index = action.GetIndex()
coll.Save(action.db)
kv = append(kv, coll.GetKVSet()...)
receiptLog := action.GetBorrowReceiptLog(&coll.Collateralize, preStatus)
receiptLog := action.GetBorrowReceiptLog(&coll.Collateralize, borrowRecord)
logs = append(logs, receiptLog)
receipt = &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}
......@@ -579,8 +582,6 @@ func (action *Action) CollateralizeRepay(repay *pty.CollateralizeRepay) (*types.
coll := &CollateralizeDB{*collateralize}
preStatus := coll.Status
// 状态检查
if coll.Status != pty.CollateralizeStatusCreated {
clog.Error("CollateralizeRepay", "CollID", repay.CollateralizeId, "addr", action.fromaddr, "execaddr", action.execaddr, "err", "status error", "Status", coll.Status)
......@@ -591,7 +592,7 @@ func (action *Action) CollateralizeRepay(repay *pty.CollateralizeRepay) (*types.
var borrowRecord *pty.BorrowRecord
var index int
for i, record := range coll.BorrowRecords {
if record.AccountAddr == action.fromaddr {
if record.RecordId == repay.RecordId {
borrowRecord = record
index = i
break
......@@ -646,10 +647,12 @@ func (action *Action) CollateralizeRepay(repay *pty.CollateralizeRepay) (*types.
coll.InvalidRecords = append(coll.InvalidRecords, borrowRecord)
coll.LatestLiquidationPrice = getLatestLiquidationPrice(&coll.Collateralize)
coll.LatestExpireTime = getLatestExpireTime(&coll.Collateralize)
coll.PreIndex = coll.Index
coll.Index = action.GetIndex()
coll.Save(action.db)
kv = append(kv, coll.GetKVSet()...)
receiptLog := action.GetRepayReceiptLog(&coll.Collateralize, preStatus)
receiptLog := action.GetRepayReceiptLog(&coll.Collateralize, borrowRecord)
logs = append(logs, receiptLog)
receipt = &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}
......@@ -669,7 +672,6 @@ func (action *Action) CollateralizeAppend(cAppend *pty.CollateralizeAppend) (*ty
}
coll := &CollateralizeDB{*collateralize}
preStatus := coll.Status
// 状态检查
if coll.Status != pty.CollateralizeStatusCreated {
......@@ -680,7 +682,7 @@ func (action *Action) CollateralizeAppend(cAppend *pty.CollateralizeAppend) (*ty
// 查找借出记录
var borrowRecord *pty.BorrowRecord
for _, record := range coll.BorrowRecords {
if record.AccountAddr == action.fromaddr {
if record.RecordId == cAppend.RecordId {
borrowRecord = record
}
}
......@@ -738,11 +740,12 @@ func (action *Action) CollateralizeAppend(cAppend *pty.CollateralizeAppend) (*ty
// 记录当前借贷的最高自动清算价格
coll.LatestLiquidationPrice = getLatestLiquidationPrice(&coll.Collateralize)
coll.LatestExpireTime = getLatestExpireTime(&coll.Collateralize)
// append操作不更新Index
coll.Save(action.db)
kv = append(kv, coll.GetKVSet()...)
receiptLog := action.GetAppendReceiptLog(&coll.Collateralize, preStatus)
receiptLog := action.GetAppendReceiptLog(&coll.Collateralize)
logs = append(logs, receiptLog)
receipt = &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}
......@@ -856,6 +859,8 @@ func (action *Action) systemLiquidation(coll *pty.Collateralize, price float32)
borrowRecord.Status = pty.CollateralizeUserStatusWarning
}
coll.PreIndex = coll.Index
coll.Index = action.GetIndex()
log := action.GetFeedReceiptLog(coll, borrowRecord)
logs = append(logs, log)
}
......@@ -910,6 +915,8 @@ func (action *Action) expireLiquidation(coll *pty.Collateralize) (*types.Receipt
borrowRecord.Status = pty.CollateralizeUserStatusExpire
}
coll.PreIndex = coll.Index
coll.Index = action.GetIndex()
log := action.GetFeedReceiptLog(coll, borrowRecord)
logs = append(logs, log)
}
......@@ -1042,20 +1049,21 @@ func (action *Action) CollateralizeClose(close *pty.CollateralizeClose) (*types.
clog.Debug("CollateralizeClose", "ID", close.CollateralizeId)
coll := &CollateralizeDB{*collateralize}
preStatus := coll.Status
coll.Status = pty.CollateralizeStatusClose
coll.PreIndex = coll.CreateIndex
coll.Index = action.GetIndex()
coll.Save(action.db)
kv = append(kv, coll.GetKVSet()...)
receiptLog := action.GetCloseReceiptLog(&coll.Collateralize, preStatus)
receiptLog := action.GetCloseReceiptLog(&coll.Collateralize)
logs = append(logs, receiptLog)
return &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}, nil
}
// 查找借贷
func queryCollateralizeByID(db dbm.KV, CollateralizeID string) (*pty.Collateralize, error) {
data, err := db.Get(Key(CollateralizeID))
func queryCollateralizeByID(db dbm.KV, collateralizeID string) (*pty.Collateralize, error) {
data, err := db.Get(Key(collateralizeID))
if err != nil {
clog.Debug("queryCollateralizeByID", "error", err)
return nil, err
......@@ -1112,14 +1120,64 @@ func queryCollateralizeByAddr(localdb dbm.Lister, addr string) ([]*pty.Collatera
return colls, nil
}
func queryCollateralizeRecordByStatus(localdb dbm.Lister, status int32) ([]*pty.CollateralizeRecord, error) {
// 精确查找发行记录
func queryCollateralizeRecordByID(db dbm.KV, collateralizeID string, recordID string) (*pty.BorrowRecord, error) {
coll, err := queryCollateralizeByID(db, collateralizeID)
if err != nil {
clog.Error("queryIssuanceRecordByID", "error", err)
return nil, err
}
for _, record := range coll.BorrowRecords {
if record.RecordId == recordID {
return record, nil
}
}
for _, record := range coll.InvalidRecords {
if record.RecordId == recordID {
return record, nil
}
}
return nil, types.ErrNotFound
}
func queryCollateralizeRecordByAddr(db dbm.KV, localdb dbm.Lister, addr string) ([]*pty.BorrowRecord, error) {
data, err := localdb.List(calcCollateralizeRecordAddrPrefix(addr), nil, DefultCount, ListDESC)
if err != nil {
clog.Debug("queryCollateralizeRecordByAddr", "error", err)
return nil, err
}
var records []*pty.BorrowRecord
var coll pty.CollateralizeRecord
for _, collBytes := range data {
err = types.Decode(collBytes, &coll)
if err != nil {
clog.Debug("queryCollateralizeRecordByAddr", "decode", err)
return nil, err
}
record, err := queryCollateralizeRecordByID(db, coll.CollateralizeId, coll.RecordId)
if err != nil {
clog.Error("queryIssuanceRecordsByStatus", "decode", err)
return nil, err
}
records = append(records, record)
}
return records, nil
}
func queryCollateralizeRecordByStatus(db dbm.KV, localdb dbm.Lister, status int32) ([]*pty.BorrowRecord, error) {
data, err := localdb.List(calcCollateralizeRecordStatusPrefix(status), nil, DefultCount, ListDESC)
if err != nil {
clog.Debug("queryCollateralizeRecordByStatus", "error", err)
return nil, err
}
var colls []*pty.CollateralizeRecord
var records []*pty.BorrowRecord
var coll pty.CollateralizeRecord
for _, collBytes := range data {
err = types.Decode(collBytes, &coll)
......@@ -1127,8 +1185,14 @@ func queryCollateralizeRecordByStatus(localdb dbm.Lister, status int32) ([]*pty.
clog.Debug("queryCollateralizesByStatus", "decode", err)
return nil, err
}
colls = append(colls, &coll)
record, err := queryCollateralizeRecordByID(db, coll.CollateralizeId, coll.RecordId)
if err != nil {
clog.Error("queryIssuanceRecordsByStatus", "decode", err)
return nil, err
}
records = append(records, record)
}
return colls, nil
return records, nil
}
......@@ -20,28 +20,38 @@ func (c *Collateralize) execDelLocal(tx *types.Transaction, receiptData *types.R
switch item.Ty {
case pty.TyLogCollateralizeCreate:
kv := c.deleteCollateralizeStatus(&collateralizeLog)
set.KV = append(set.KV, kv...)
set.KV = append(set.KV, c.deleteCollateralizeStatus(collateralizeLog.Status, collateralizeLog.Index)...)
set.KV = append(set.KV, c.deleteCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.Index)...)
break
case pty.TyLogCollateralizeBorrow:
set.KV = append(set.KV, c.deleteCollateralizeRecordStatus(&collateralizeLog)...)
set.KV = append(set.KV, c.deleteCollateralizeAddr(&collateralizeLog)...)
set.KV = append(set.KV, c.deleteCollateralizeRecordStatus(collateralizeLog.RecordStatus, collateralizeLog.Index)...)
set.KV = append(set.KV, c.deleteCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.Index)...)
break
case pty.TyLogCollateralizeAppend: // append没有状态变化
break
case pty.TyLogCollateralizeRepay:
set.KV = append(set.KV, c.deleteCollateralizeRecordStatus(&collateralizeLog)...)
set.KV = append(set.KV, c.addCollateralizeAddr(&collateralizeLog)...)
set.KV = append(set.KV, c.addCollateralizeRecordStatus(collateralizeLog.RecordPreStatus, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.PreIndex)...)
set.KV = append(set.KV, c.deleteCollateralizeRecordStatus(collateralizeLog.RecordStatus, collateralizeLog.Index)...)
set.KV = append(set.KV, c.addCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.PreIndex)...)
break
case pty.TyLogCollateralizeFeed:
set.KV = append(set.KV, c.deleteCollateralizeRecordStatus(&collateralizeLog)...)
if collateralizeLog.RecordStatus == pty.CollateralizeUserStatusSystemLiquidate {
set.KV = append(set.KV, c.addCollateralizeAddr(&collateralizeLog)...)
set.KV = append(set.KV, c.addCollateralizeRecordStatus(collateralizeLog.RecordStatus, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.PreIndex)...)
set.KV = append(set.KV, c.deleteCollateralizeRecordStatus(collateralizeLog.RecordStatus, collateralizeLog.Index)...)
set.KV = append(set.KV, c.addCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.PreIndex)...)
// 如果没有被清算,需要把地址索引更新
if collateralizeLog.RecordStatus == pty.CollateralizeUserStatusWarning || collateralizeLog.RecordStatus == pty.CollateralizeUserStatusExpire {
set.KV = append(set.KV, c.deleteCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.Index)...)
}
break
case pty.TyLogCollateralizeClose:
kv := c.addCollateralizeStatus(&collateralizeLog)
set.KV = append(set.KV, kv...)
set.KV = append(set.KV, c.addCollateralizeStatus(pty.CollateralizeStatusCreated, collateralizeLog.CollateralizeId,
collateralizeLog.PreIndex)...)
set.KV = append(set.KV, c.addCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.CollateralizeId,
collateralizeLog.PreIndex)...)
break
}
}
......
......@@ -21,26 +21,37 @@ func (c *Collateralize) execLocal(tx *types.Transaction, receipt *types.ReceiptD
switch item.Ty {
case pty.TyLogCollateralizeCreate:
set.KV = append(set.KV, c.addCollateralizeStatus(&collateralizeLog)...)
set.KV = append(set.KV, c.addCollateralizeStatus(collateralizeLog.Status, collateralizeLog.CollateralizeId, collateralizeLog.Index)...)
set.KV = append(set.KV, c.addCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.CollateralizeId, collateralizeLog.Index)...)
break
case pty.TyLogCollateralizeBorrow:
set.KV = append(set.KV, c.addCollateralizeRecordStatus(&collateralizeLog)...)
set.KV = append(set.KV, c.addCollateralizeAddr(&collateralizeLog)...)
set.KV = append(set.KV, c.addCollateralizeRecordStatus(collateralizeLog.RecordStatus, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.Index)...)
set.KV = append(set.KV, c.addCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.Index)...)
break
case pty.TyLogCollateralizeAppend: //append没有状态变化
break
case pty.TyLogCollateralizeRepay:
set.KV = append(set.KV, c.addCollateralizeRecordStatus(&collateralizeLog)...)
set.KV = append(set.KV, c.deleteCollateralizeAddr(&collateralizeLog)...)
set.KV = append(set.KV, c.deleteCollateralizeRecordStatus(collateralizeLog.RecordPreStatus, collateralizeLog.PreIndex)...)
set.KV = append(set.KV, c.addCollateralizeRecordStatus(collateralizeLog.RecordStatus, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.Index)...)
set.KV = append(set.KV, c.deleteCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.PreIndex)...)
break
case pty.TyLogCollateralizeFeed:
set.KV = append(set.KV, c.addCollateralizeRecordStatus(&collateralizeLog)...)
if collateralizeLog.RecordStatus == pty.CollateralizeUserStatusSystemLiquidate {
set.KV = append(set.KV, c.deleteCollateralizeAddr(&collateralizeLog)...)
set.KV = append(set.KV, c.deleteCollateralizeRecordStatus(collateralizeLog.RecordPreStatus, collateralizeLog.PreIndex)...)
set.KV = append(set.KV, c.addCollateralizeRecordStatus(collateralizeLog.RecordStatus, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.Index)...)
set.KV = append(set.KV, c.deleteCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.PreIndex)...)
// 如果没有被清算,需要把地址索引更新
if collateralizeLog.RecordStatus == pty.CollateralizeUserStatusWarning || collateralizeLog.RecordStatus == pty.CollateralizeUserStatusExpire {
set.KV = append(set.KV, c.addCollateralizeRecordAddr(collateralizeLog.AccountAddr, collateralizeLog.CollateralizeId,
collateralizeLog.RecordId, collateralizeLog.Index)...)
}
break
case pty.TyLogCollateralizeClose:
set.KV = append(set.KV, c.deleteCollateralizeStatus(&collateralizeLog)...)
set.KV = append(set.KV, c.deleteCollateralizeStatus(pty.CollateralizeStatusCreated, collateralizeLog.PreIndex)...)
set.KV = append(set.KV, c.deleteCollateralizeAddr(collateralizeLog.CreateAddr, collateralizeLog.PreIndex)...)
break
}
}
......
......@@ -41,6 +41,16 @@ func calcCollateralizeLatestPriceKey() []byte {
return []byte(key)
}
func calcCollateralizeRecordAddrPrefix(addr string) []byte {
key := fmt.Sprintf("LODB-Collateralize-record-addr:%d", addr)
return []byte(key)
}
func calcCollateralizeRecordAddrKey(addr string, index int64) []byte {
key := fmt.Sprintf("LODB-Collateralize-record-addr:%d:%018d", addr, index)
return []byte(key)
}
func calcCollateralizeRecordStatusPrefix(status int32) []byte {
key := fmt.Sprintf("LODB-Collateralize-record-status:%d", status)
return []byte(key)
......
......@@ -80,66 +80,40 @@ func (c *Collateralize) Query_CollateralizeByAddr(req *pty.ReqCollateralizeByAdd
return ids, nil
}
func (c *Collateralize) Query_CollateralizeBorrowInfoByAddr(req *pty.ReqCollateralizeBorrowInfoByAddr) (types.Message, error) {
records, err := queryCollateralizeByAddr(c.GetLocalDB(), req.Addr)
func (c *Collateralize) Query_CollateralizeRecordByID(req *pty.ReqCollateralizeRecord) (types.Message, error) {
issuRecord, err := queryCollateralizeRecordByID(c.GetStateDB(), req.CollateralizeId, req.RecordId)
if err != nil {
clog.Error("Query_CollateralizeBorrowInfoByAddr", "get collateralize record error", err)
clog.Error("Query_IssuanceRecordByID", "get issuance record error", err)
return nil, err
}
ret := &pty.RepCollateralizeBorrowInfos{}
for _, record := range records {
if record.CollateralizeId == req.CollateralizeId {
coll, err := queryCollateralizeByID(c.GetStateDB(), record.CollateralizeId)
ret := &pty.RepCollateralizeRecord{}
ret.Record = issuRecord
return issuRecord, nil
}
func (c *Collateralize) Query_CollateralizeRecordByAddr(req *pty.ReqCollateralizeRecordByAddr) (types.Message, error) {
records, err := queryCollateralizeRecordByAddr(c.GetStateDB(), c.GetLocalDB(), req.Addr)
if err != nil {
clog.Error("Query_CollateralizeBorrowInfoByAddr", "get collateralize record error", err)
clog.Error("Query_CollateralizeRecordByAddr", "get collateralize record error", err)
return nil, err
}
for _, borrowRecord := range coll.BorrowRecords {
if borrowRecord.AccountAddr == req.Addr {
ret.Record = append(ret.Record, borrowRecord)
}
}
for _, borrowRecord := range coll.InvalidRecords {
if borrowRecord.AccountAddr == req.Addr {
ret.Record = append(ret.Record, borrowRecord)
}
}
}
}
ret := &pty.RepCollateralizeRecords{}
ret.Records = records
return nil, pty.ErrRecordNotExist
return ret, nil
}
func (c *Collateralize) Query_CollateralizeBorrowInfoByStatus(req *pty.ReqCollateralizeBorrowInfoByStatus) (types.Message, error) {
records, err := queryCollateralizeRecordByStatus(c.GetLocalDB(), req.Status)
func (c *Collateralize) Query_CollateralizeRecordByStatus(req *pty.ReqCollateralizeRecordByStatus) (types.Message, error) {
records, err := queryCollateralizeRecordByStatus(c.GetStateDB(), c.GetLocalDB(), req.Status)
if err != nil {
clog.Error("Query_CollateralizeBorrowInfoByAddr", "get collateralize record error", err)
clog.Error("Query_CollateralizeRecordByAddr", "get collateralize record error", err)
return nil, err
}
ret := &pty.RepCollateralizeBorrowInfos{}
for _, record := range records {
coll, err := queryCollateralizeByID(c.GetStateDB(), record.CollateralizeId)
if err != nil {
clog.Error("Query_CollateralizeBorrowInfoByAddr", "get collateralize record error", err)
return nil, err
}
for _, borrowRecord := range coll.BorrowRecords {
if borrowRecord.Status == req.Status {
ret.Record = append(ret.Record, borrowRecord)
}
}
for _, borrowRecord := range coll.InvalidRecords {
if borrowRecord.Status == req.Status {
ret.Record = append(ret.Record, borrowRecord)
}
}
}
ret := &pty.RepCollateralizeRecords{}
ret.Records = records
return ret, nil
}
\ No newline at end of file
......@@ -18,6 +18,9 @@ message Collateralize {
float latestLiquidationPrice = 12;//最高清算价格
int64 period = 13;//借贷最大期限
int64 latestExpireTime = 14;//最近超期时间
int64 index = 15;//当前索引
int64 preIndex = 16;//上一个索引
int64 createIndex = 17;//创建时的索引,用于close删除记录
}
// 借出记录
......@@ -32,6 +35,7 @@ message BorrowRecord {
int64 liquidateTime = 8; //清算时间
int64 expireTime = 9; //超时清算时间
int32 preStatus = 10;//上一次抵押状态,用于告警恢复
string recordId = 11;//借出id,标识一次借出记录
}
// 资产价格记录
......@@ -80,13 +84,15 @@ message CollateralizeBorrow {
// 质押清算
message CollateralizeRepay {
string collateralizeId = 1; //借贷期数ID
int64 value = 2; //借贷价值(ccny)
string recordId = 2; //借贷ID
int64 value = 3; //借贷价值(ccny)
}
// 追加抵押物
message CollateralizeAppend {
string collateralizeId = 1; //借贷期数ID
int64 collateralValue = 2; //追加价值(bty)
string recordId = 2; //借贷ID
int64 collateralValue = 3; //追加价值(bty)
}
// 喂价
......@@ -107,16 +113,19 @@ message ReceiptCollateralize {
string createAddr = 2;
string accountAddr = 3;
int32 status = 4;
int32 preStatus = 5;
int64 index = 6;
int32 recordStatus = 7;
int64 index = 5;
int32 recordStatus = 6;
int32 recordPreStatus = 7;
string recordId = 8;
int64 preIndex = 9;
}
// exec_local 借贷记录信息
message CollateralizeRecord {
string collateralizeId = 1;
string addr = 2;
int64 index = 3;
string recordId = 3;
int64 index = 4;
}
// exec_local 借贷记录信息列表
......@@ -166,18 +175,29 @@ message RepCollateralizeIDs {
}
// 根据地址和借贷ID混合查询具体借贷记录
message ReqCollateralizeBorrowInfoByAddr {
message ReqCollateralizeRecordByAddr {
string collateralizeId = 1;
string addr = 2;
}
// 根据状态和借贷ID混合查询具体借贷记录
message ReqCollateralizeBorrowInfoByStatus {
message ReqCollateralizeRecordByStatus {
string collateralizeId = 1;
int32 status = 2;
}
// 返回借贷记录
message RepCollateralizeBorrowInfos {
repeated BorrowRecord record = 1;
message RepCollateralizeRecords {
repeated BorrowRecord records = 1;
}
// 精确查找借贷记录
message ReqCollateralizeRecord {
string collateralizeId = 1;
string recordId = 2;
}
// 返回记录
message RepCollateralizeRecord {
BorrowRecord record = 1;
}
......@@ -36,6 +36,9 @@ type Collateralize struct {
LatestLiquidationPrice float32 `protobuf:"fixed32,12,opt,name=latestLiquidationPrice,proto3" json:"latestLiquidationPrice,omitempty"`
Period int64 `protobuf:"varint,13,opt,name=period,proto3" json:"period,omitempty"`
LatestExpireTime int64 `protobuf:"varint,14,opt,name=latestExpireTime,proto3" json:"latestExpireTime,omitempty"`
Index int64 `protobuf:"varint,15,opt,name=index,proto3" json:"index,omitempty"`
PreIndex int64 `protobuf:"varint,16,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
CreateIndex int64 `protobuf:"varint,17,opt,name=createIndex,proto3" json:"createIndex,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -164,6 +167,27 @@ func (m *Collateralize) GetLatestExpireTime() int64 {
return 0
}
func (m *Collateralize) GetIndex() int64 {
if m != nil {
return m.Index
}
return 0
}
func (m *Collateralize) GetPreIndex() int64 {
if m != nil {
return m.PreIndex
}
return 0
}
func (m *Collateralize) GetCreateIndex() int64 {
if m != nil {
return m.CreateIndex
}
return 0
}
// 借出记录
type BorrowRecord struct {
AccountAddr string `protobuf:"bytes,1,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
......@@ -176,6 +200,7 @@ type BorrowRecord struct {
LiquidateTime int64 `protobuf:"varint,8,opt,name=liquidateTime,proto3" json:"liquidateTime,omitempty"`
ExpireTime int64 `protobuf:"varint,9,opt,name=expireTime,proto3" json:"expireTime,omitempty"`
PreStatus int32 `protobuf:"varint,10,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
RecordId string `protobuf:"bytes,11,opt,name=recordId,proto3" json:"recordId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -276,6 +301,13 @@ func (m *BorrowRecord) GetPreStatus() int32 {
return 0
}
func (m *BorrowRecord) GetRecordId() string {
if m != nil {
return m.RecordId
}
return ""
}
// 资产价格记录
type AssetPriceRecord struct {
RecordTime int64 `protobuf:"varint,1,opt,name=recordTime,proto3" json:"recordTime,omitempty"`
......@@ -697,7 +729,8 @@ func (m *CollateralizeBorrow) GetValue() int64 {
// 质押清算
type CollateralizeRepay struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
RecordId string `protobuf:"bytes,2,opt,name=recordId,proto3" json:"recordId,omitempty"`
Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -735,6 +768,13 @@ func (m *CollateralizeRepay) GetCollateralizeId() string {
return ""
}
func (m *CollateralizeRepay) GetRecordId() string {
if m != nil {
return m.RecordId
}
return ""
}
func (m *CollateralizeRepay) GetValue() int64 {
if m != nil {
return m.Value
......@@ -745,7 +785,8 @@ func (m *CollateralizeRepay) GetValue() int64 {
// 追加抵押物
type CollateralizeAppend struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
CollateralValue int64 `protobuf:"varint,2,opt,name=collateralValue,proto3" json:"collateralValue,omitempty"`
RecordId string `protobuf:"bytes,2,opt,name=recordId,proto3" json:"recordId,omitempty"`
CollateralValue int64 `protobuf:"varint,3,opt,name=collateralValue,proto3" json:"collateralValue,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -783,6 +824,13 @@ func (m *CollateralizeAppend) GetCollateralizeId() string {
return ""
}
func (m *CollateralizeAppend) GetRecordId() string {
if m != nil {
return m.RecordId
}
return ""
}
func (m *CollateralizeAppend) GetCollateralValue() int64 {
if m != nil {
return m.CollateralValue
......@@ -892,9 +940,11 @@ type ReceiptCollateralize struct {
CreateAddr string `protobuf:"bytes,2,opt,name=createAddr,proto3" json:"createAddr,omitempty"`
AccountAddr string `protobuf:"bytes,3,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
PreStatus int32 `protobuf:"varint,5,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
Index int64 `protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty"`
RecordStatus int32 `protobuf:"varint,7,opt,name=recordStatus,proto3" json:"recordStatus,omitempty"`
Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
RecordStatus int32 `protobuf:"varint,6,opt,name=recordStatus,proto3" json:"recordStatus,omitempty"`
RecordPreStatus int32 `protobuf:"varint,7,opt,name=recordPreStatus,proto3" json:"recordPreStatus,omitempty"`
RecordId string `protobuf:"bytes,8,opt,name=recordId,proto3" json:"recordId,omitempty"`
PreIndex int64 `protobuf:"varint,9,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -953,23 +1003,37 @@ func (m *ReceiptCollateralize) GetStatus() int32 {
return 0
}
func (m *ReceiptCollateralize) GetPreStatus() int32 {
func (m *ReceiptCollateralize) GetIndex() int64 {
if m != nil {
return m.PreStatus
return m.Index
}
return 0
}
func (m *ReceiptCollateralize) GetIndex() int64 {
func (m *ReceiptCollateralize) GetRecordStatus() int32 {
if m != nil {
return m.Index
return m.RecordStatus
}
return 0
}
func (m *ReceiptCollateralize) GetRecordStatus() int32 {
func (m *ReceiptCollateralize) GetRecordPreStatus() int32 {
if m != nil {
return m.RecordStatus
return m.RecordPreStatus
}
return 0
}
func (m *ReceiptCollateralize) GetRecordId() string {
if m != nil {
return m.RecordId
}
return ""
}
func (m *ReceiptCollateralize) GetPreIndex() int64 {
if m != nil {
return m.PreIndex
}
return 0
}
......@@ -978,7 +1042,8 @@ func (m *ReceiptCollateralize) GetRecordStatus() int32 {
type CollateralizeRecord struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Index int64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
RecordId string `protobuf:"bytes,3,opt,name=recordId,proto3" json:"recordId,omitempty"`
Index int64 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -1023,6 +1088,13 @@ func (m *CollateralizeRecord) GetAddr() string {
return ""
}
func (m *CollateralizeRecord) GetRecordId() string {
if m != nil {
return m.RecordId
}
return ""
}
func (m *CollateralizeRecord) GetIndex() int64 {
if m != nil {
return m.Index
......@@ -1399,7 +1471,7 @@ func (m *RepCollateralizeIDs) GetIDs() []string {
}
// 根据地址和借贷ID混合查询具体借贷记录
type ReqCollateralizeBorrowInfoByAddr struct {
type ReqCollateralizeRecordByAddr struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
......@@ -1407,39 +1479,39 @@ type ReqCollateralizeBorrowInfoByAddr struct {
XXX_sizecache int32 `json:"-"`
}
func (m *ReqCollateralizeBorrowInfoByAddr) Reset() { *m = ReqCollateralizeBorrowInfoByAddr{} }
func (m *ReqCollateralizeBorrowInfoByAddr) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeBorrowInfoByAddr) ProtoMessage() {}
func (*ReqCollateralizeBorrowInfoByAddr) Descriptor() ([]byte, []int) {
func (m *ReqCollateralizeRecordByAddr) Reset() { *m = ReqCollateralizeRecordByAddr{} }
func (m *ReqCollateralizeRecordByAddr) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeRecordByAddr) ProtoMessage() {}
func (*ReqCollateralizeRecordByAddr) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{22}
}
func (m *ReqCollateralizeBorrowInfoByAddr) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqCollateralizeBorrowInfoByAddr.Unmarshal(m, b)
func (m *ReqCollateralizeRecordByAddr) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqCollateralizeRecordByAddr.Unmarshal(m, b)
}
func (m *ReqCollateralizeBorrowInfoByAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqCollateralizeBorrowInfoByAddr.Marshal(b, m, deterministic)
func (m *ReqCollateralizeRecordByAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqCollateralizeRecordByAddr.Marshal(b, m, deterministic)
}
func (m *ReqCollateralizeBorrowInfoByAddr) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqCollateralizeBorrowInfoByAddr.Merge(m, src)
func (m *ReqCollateralizeRecordByAddr) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqCollateralizeRecordByAddr.Merge(m, src)
}
func (m *ReqCollateralizeBorrowInfoByAddr) XXX_Size() int {
return xxx_messageInfo_ReqCollateralizeBorrowInfoByAddr.Size(m)
func (m *ReqCollateralizeRecordByAddr) XXX_Size() int {
return xxx_messageInfo_ReqCollateralizeRecordByAddr.Size(m)
}
func (m *ReqCollateralizeBorrowInfoByAddr) XXX_DiscardUnknown() {
xxx_messageInfo_ReqCollateralizeBorrowInfoByAddr.DiscardUnknown(m)
func (m *ReqCollateralizeRecordByAddr) XXX_DiscardUnknown() {
xxx_messageInfo_ReqCollateralizeRecordByAddr.DiscardUnknown(m)
}
var xxx_messageInfo_ReqCollateralizeBorrowInfoByAddr proto.InternalMessageInfo
var xxx_messageInfo_ReqCollateralizeRecordByAddr proto.InternalMessageInfo
func (m *ReqCollateralizeBorrowInfoByAddr) GetCollateralizeId() string {
func (m *ReqCollateralizeRecordByAddr) GetCollateralizeId() string {
if m != nil {
return m.CollateralizeId
}
return ""
}
func (m *ReqCollateralizeBorrowInfoByAddr) GetAddr() string {
func (m *ReqCollateralizeRecordByAddr) GetAddr() string {
if m != nil {
return m.Addr
}
......@@ -1447,7 +1519,7 @@ func (m *ReqCollateralizeBorrowInfoByAddr) GetAddr() string {
}
// 根据状态和借贷ID混合查询具体借贷记录
type ReqCollateralizeBorrowInfoByStatus struct {
type ReqCollateralizeRecordByStatus struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
......@@ -1455,39 +1527,39 @@ type ReqCollateralizeBorrowInfoByStatus struct {
XXX_sizecache int32 `json:"-"`
}
func (m *ReqCollateralizeBorrowInfoByStatus) Reset() { *m = ReqCollateralizeBorrowInfoByStatus{} }
func (m *ReqCollateralizeBorrowInfoByStatus) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeBorrowInfoByStatus) ProtoMessage() {}
func (*ReqCollateralizeBorrowInfoByStatus) Descriptor() ([]byte, []int) {
func (m *ReqCollateralizeRecordByStatus) Reset() { *m = ReqCollateralizeRecordByStatus{} }
func (m *ReqCollateralizeRecordByStatus) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeRecordByStatus) ProtoMessage() {}
func (*ReqCollateralizeRecordByStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{23}
}
func (m *ReqCollateralizeBorrowInfoByStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqCollateralizeBorrowInfoByStatus.Unmarshal(m, b)
func (m *ReqCollateralizeRecordByStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqCollateralizeRecordByStatus.Unmarshal(m, b)
}
func (m *ReqCollateralizeBorrowInfoByStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqCollateralizeBorrowInfoByStatus.Marshal(b, m, deterministic)
func (m *ReqCollateralizeRecordByStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqCollateralizeRecordByStatus.Marshal(b, m, deterministic)
}
func (m *ReqCollateralizeBorrowInfoByStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqCollateralizeBorrowInfoByStatus.Merge(m, src)
func (m *ReqCollateralizeRecordByStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqCollateralizeRecordByStatus.Merge(m, src)
}
func (m *ReqCollateralizeBorrowInfoByStatus) XXX_Size() int {
return xxx_messageInfo_ReqCollateralizeBorrowInfoByStatus.Size(m)
func (m *ReqCollateralizeRecordByStatus) XXX_Size() int {
return xxx_messageInfo_ReqCollateralizeRecordByStatus.Size(m)
}
func (m *ReqCollateralizeBorrowInfoByStatus) XXX_DiscardUnknown() {
xxx_messageInfo_ReqCollateralizeBorrowInfoByStatus.DiscardUnknown(m)
func (m *ReqCollateralizeRecordByStatus) XXX_DiscardUnknown() {
xxx_messageInfo_ReqCollateralizeRecordByStatus.DiscardUnknown(m)
}
var xxx_messageInfo_ReqCollateralizeBorrowInfoByStatus proto.InternalMessageInfo
var xxx_messageInfo_ReqCollateralizeRecordByStatus proto.InternalMessageInfo
func (m *ReqCollateralizeBorrowInfoByStatus) GetCollateralizeId() string {
func (m *ReqCollateralizeRecordByStatus) GetCollateralizeId() string {
if m != nil {
return m.CollateralizeId
}
return ""
}
func (m *ReqCollateralizeBorrowInfoByStatus) GetStatus() int32 {
func (m *ReqCollateralizeRecordByStatus) GetStatus() int32 {
if m != nil {
return m.Status
}
......@@ -1495,39 +1567,127 @@ func (m *ReqCollateralizeBorrowInfoByStatus) GetStatus() int32 {
}
// 返回借贷记录
type RepCollateralizeBorrowInfos struct {
Record []*BorrowRecord `protobuf:"bytes,1,rep,name=record,proto3" json:"record,omitempty"`
type RepCollateralizeRecords struct {
Records []*BorrowRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RepCollateralizeBorrowInfos) Reset() { *m = RepCollateralizeBorrowInfos{} }
func (m *RepCollateralizeBorrowInfos) String() string { return proto.CompactTextString(m) }
func (*RepCollateralizeBorrowInfos) ProtoMessage() {}
func (*RepCollateralizeBorrowInfos) Descriptor() ([]byte, []int) {
func (m *RepCollateralizeRecords) Reset() { *m = RepCollateralizeRecords{} }
func (m *RepCollateralizeRecords) String() string { return proto.CompactTextString(m) }
func (*RepCollateralizeRecords) ProtoMessage() {}
func (*RepCollateralizeRecords) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{24}
}
func (m *RepCollateralizeBorrowInfos) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RepCollateralizeBorrowInfos.Unmarshal(m, b)
func (m *RepCollateralizeRecords) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RepCollateralizeRecords.Unmarshal(m, b)
}
func (m *RepCollateralizeRecords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RepCollateralizeRecords.Marshal(b, m, deterministic)
}
func (m *RepCollateralizeRecords) XXX_Merge(src proto.Message) {
xxx_messageInfo_RepCollateralizeRecords.Merge(m, src)
}
func (m *RepCollateralizeRecords) XXX_Size() int {
return xxx_messageInfo_RepCollateralizeRecords.Size(m)
}
func (m *RepCollateralizeRecords) XXX_DiscardUnknown() {
xxx_messageInfo_RepCollateralizeRecords.DiscardUnknown(m)
}
var xxx_messageInfo_RepCollateralizeRecords proto.InternalMessageInfo
func (m *RepCollateralizeRecords) GetRecords() []*BorrowRecord {
if m != nil {
return m.Records
}
return nil
}
// 精确查找借贷记录
type ReqCollateralizeRecord struct {
CollateralizeId string `protobuf:"bytes,1,opt,name=collateralizeId,proto3" json:"collateralizeId,omitempty"`
RecordId string `protobuf:"bytes,2,opt,name=recordId,proto3" json:"recordId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqCollateralizeRecord) Reset() { *m = ReqCollateralizeRecord{} }
func (m *ReqCollateralizeRecord) String() string { return proto.CompactTextString(m) }
func (*ReqCollateralizeRecord) ProtoMessage() {}
func (*ReqCollateralizeRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{25}
}
func (m *ReqCollateralizeRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqCollateralizeRecord.Unmarshal(m, b)
}
func (m *ReqCollateralizeRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqCollateralizeRecord.Marshal(b, m, deterministic)
}
func (m *ReqCollateralizeRecord) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqCollateralizeRecord.Merge(m, src)
}
func (m *ReqCollateralizeRecord) XXX_Size() int {
return xxx_messageInfo_ReqCollateralizeRecord.Size(m)
}
func (m *ReqCollateralizeRecord) XXX_DiscardUnknown() {
xxx_messageInfo_ReqCollateralizeRecord.DiscardUnknown(m)
}
var xxx_messageInfo_ReqCollateralizeRecord proto.InternalMessageInfo
func (m *ReqCollateralizeRecord) GetCollateralizeId() string {
if m != nil {
return m.CollateralizeId
}
return ""
}
func (m *ReqCollateralizeRecord) GetRecordId() string {
if m != nil {
return m.RecordId
}
return ""
}
// 返回记录
type RepCollateralizeRecord struct {
Record *BorrowRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RepCollateralizeRecord) Reset() { *m = RepCollateralizeRecord{} }
func (m *RepCollateralizeRecord) String() string { return proto.CompactTextString(m) }
func (*RepCollateralizeRecord) ProtoMessage() {}
func (*RepCollateralizeRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_a988fb4a61381972, []int{26}
}
func (m *RepCollateralizeRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RepCollateralizeRecord.Unmarshal(m, b)
}
func (m *RepCollateralizeBorrowInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RepCollateralizeBorrowInfos.Marshal(b, m, deterministic)
func (m *RepCollateralizeRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RepCollateralizeRecord.Marshal(b, m, deterministic)
}
func (m *RepCollateralizeBorrowInfos) XXX_Merge(src proto.Message) {
xxx_messageInfo_RepCollateralizeBorrowInfos.Merge(m, src)
func (m *RepCollateralizeRecord) XXX_Merge(src proto.Message) {
xxx_messageInfo_RepCollateralizeRecord.Merge(m, src)
}
func (m *RepCollateralizeBorrowInfos) XXX_Size() int {
return xxx_messageInfo_RepCollateralizeBorrowInfos.Size(m)
func (m *RepCollateralizeRecord) XXX_Size() int {
return xxx_messageInfo_RepCollateralizeRecord.Size(m)
}
func (m *RepCollateralizeBorrowInfos) XXX_DiscardUnknown() {
xxx_messageInfo_RepCollateralizeBorrowInfos.DiscardUnknown(m)
func (m *RepCollateralizeRecord) XXX_DiscardUnknown() {
xxx_messageInfo_RepCollateralizeRecord.DiscardUnknown(m)
}
var xxx_messageInfo_RepCollateralizeBorrowInfos proto.InternalMessageInfo
var xxx_messageInfo_RepCollateralizeRecord proto.InternalMessageInfo
func (m *RepCollateralizeBorrowInfos) GetRecord() []*BorrowRecord {
func (m *RepCollateralizeRecord) GetRecord() *BorrowRecord {
if m != nil {
return m.Record
}
......@@ -1557,80 +1717,88 @@ func init() {
proto.RegisterType((*ReqCollateralizeByStatus)(nil), "types.ReqCollateralizeByStatus")
proto.RegisterType((*ReqCollateralizeByAddr)(nil), "types.ReqCollateralizeByAddr")
proto.RegisterType((*RepCollateralizeIDs)(nil), "types.RepCollateralizeIDs")
proto.RegisterType((*ReqCollateralizeBorrowInfoByAddr)(nil), "types.ReqCollateralizeBorrowInfoByAddr")
proto.RegisterType((*ReqCollateralizeBorrowInfoByStatus)(nil), "types.ReqCollateralizeBorrowInfoByStatus")
proto.RegisterType((*RepCollateralizeBorrowInfos)(nil), "types.RepCollateralizeBorrowInfos")
proto.RegisterType((*ReqCollateralizeRecordByAddr)(nil), "types.ReqCollateralizeRecordByAddr")
proto.RegisterType((*ReqCollateralizeRecordByStatus)(nil), "types.ReqCollateralizeRecordByStatus")
proto.RegisterType((*RepCollateralizeRecords)(nil), "types.RepCollateralizeRecords")
proto.RegisterType((*ReqCollateralizeRecord)(nil), "types.ReqCollateralizeRecord")
proto.RegisterType((*RepCollateralizeRecord)(nil), "types.RepCollateralizeRecord")
}
func init() { proto.RegisterFile("collateralize.proto", fileDescriptor_a988fb4a61381972) }
var fileDescriptor_a988fb4a61381972 = []byte{
// 1064 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xdd, 0x6e,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a, 0xb1, 0xcf,
0x90, 0x1c, 0x57, 0xf9, 0xa2, 0xd9, 0x5c, 0x37, 0xfb, 0x16, 0x9f, 0x40, 0x39, 0xf0, 0x11, 0xf8,
0x76, 0x78, 0x17, 0x73, 0x7d, 0x02, 0xd6, 0x34, 0x8b, 0x3f, 0x84, 0xe3, 0xb6, 0x0f, 0x95, 0x61,
0x41, 0x5c, 0xa7, 0x26, 0x2e, 0xff, 0x10, 0x0e, 0xed, 0x38, 0x26, 0x4f, 0x2b, 0x76, 0x00, 0xde,
0xe4, 0xe9, 0x22, 0x63, 0xfc, 0xe4, 0x3f, 0xc1, 0xa0, 0xb5, 0x2c, 0xa9, 0x3c, 0xc6, 0xab, 0x37,
0x78, 0xab, 0x33, 0xc4, 0xaf, 0x80, 0xdf, 0xb6, 0x83, 0x4e, 0x7b, 0xf3, 0x3d, 0xea, 0x02, 0xb9,
0x46, 0x81, 0xbe, 0x6e, 0x1f, 0x82, 0x7a, 0x9f, 0x8a, 0x7d, 0x0c, 0x3d, 0x75, 0xe2, 0x74, 0xbb,
0x56, 0xfe, 0xbf, 0xd0, 0x90, 0x69, 0x8f, 0xfe, 0xf3, 0x3d, 0xfa, 0x37, 0x00, 0x00, 0xff, 0xff,
0x99, 0x60, 0x18, 0x70, 0x0a, 0x0e, 0x00, 0x00,
// 1155 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x51, 0x6f, 0xe3, 0xc4,
0x13, 0x3f, 0xdb, 0x49, 0xda, 0x4c, 0xda, 0x5e, 0xbb, 0xed, 0xbf, 0x7f, 0x53, 0x4e, 0x55, 0xb4,
0x42, 0x22, 0x82, 0xa3, 0x12, 0xbd, 0x13, 0xe2, 0x84, 0x84, 0x68, 0x7b, 0x77, 0x6a, 0xa4, 0x43,
0x3a, 0x99, 0x03, 0xf1, 0x00, 0x48, 0x8e, 0xbd, 0x3d, 0x2c, 0xb9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
_ "github.com/33cn/plugin/plugin/dapp/game" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/guess" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/hashlock" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/issuance" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/js" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/lottery" //auto gen
_ "github.com/33cn/plugin/plugin/dapp/multisig" //auto gen
......
......@@ -245,7 +245,8 @@ func addIssuanceQueryFlags(cmd *cobra.Command) {
cmd.Flags().StringP("address", "a", "", "address")
cmd.Flags().StringP("index", "i", "", "index")
cmd.Flags().StringP("status", "s", "", "status")
cmd.Flags().StringP("issuanceIDs", "d", "", "issuance IDs")
cmd.Flags().StringP("issuanceIDs", "e", "", "issuance IDs")
cmd.Flags().StringP("debtID", "d", "", "debt ID")
}
func IssuanceQuery(cmd *cobra.Command, args []string) {
......@@ -255,6 +256,7 @@ func IssuanceQuery(cmd *cobra.Command, args []string) {
statusStr, _ := cmd.Flags().GetString("status")
// indexstr, _ := cmd.Flags().GetString("index")
issuanceIDs, _ := cmd.Flags().GetString("issuanceIDs")
debtID, _ := cmd.Flags().GetString("debtID")
var params rpctypes.Query4Jrpc
params.Execer = pkt.IssuanceX
......@@ -277,46 +279,49 @@ func IssuanceQuery(cmd *cobra.Command, args []string) {
if issuanceID != "" {
if statusStr != "" {
params.FuncName = "IssuanceDebtInfoByStatus"
params.FuncName = "IssuanceRecordsByStatus"
req := &pkt.ReqIssuanceDebtInfoByStatus{
req := &pkt.ReqIssuanceRecordsByStatus{
IssuanceId: issuanceID,
Status: int32(status),
}
params.Payload = types.MustPBToJSON(req)
var res pkt.RepIssuanceDebtInfos
var res pkt.RepIssuanceRecords
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run()
} else if address != "" {
params.FuncName = "IssuanceDebtInfoByAddr"
params.FuncName = "IssuanceRecordsByAddr"
req := &pkt.ReqIssuanceDebtInfoByAddr{
req := &pkt.ReqIssuanceRecordsByAddr{
IssuanceId: issuanceID,
Addr: address,
}
params.Payload = types.MustPBToJSON(req)
var res pkt.RepIssuanceDebtInfos
var res pkt.RepIssuanceDebtInfo
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run()
} else {
params.FuncName = "IssuanceInfoByID"
} else if debtID != ""{
params.FuncName = "IssuanceRecordByID"
req := &pkt.ReqIssuanceInfo{
req := &pkt.ReqIssuanceDebtInfo{
IssuanceId: issuanceID,
DebtId: debtID,
}
params.Payload = types.MustPBToJSON(req)
var res pkt.RepIssuanceCurrentInfo
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run()
}
} else if address != "" {
params.FuncName = "IssuanceByAddr"
} else {
params.FuncName = "IssuanceInfoByID"
req := &pkt.ReqIssuanceByAddr{Addr: address}
req := &pkt.ReqIssuanceInfo{
IssuanceId: issuanceID,
}
params.Payload = types.MustPBToJSON(req)
var res pkt.RepIssuanceIDs
var res pkt.RepIssuanceCurrentInfo
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run()
}
} else if statusStr != "" {
params.FuncName = "IssuanceByStatus"
......
......@@ -12,34 +12,40 @@ import (
func (c *Issuance) execDelLocal(tx *types.Transaction, receiptData *types.ReceiptData) (*types.LocalDBSet, error) {
set := &types.LocalDBSet{}
for _, item := range receiptData.Logs {
var IssuanceLog pty.ReceiptIssuance
err := types.Decode(item.Log, &IssuanceLog)
var issuanceLog pty.ReceiptIssuance
err := types.Decode(item.Log, &issuanceLog)
if err != nil {
return nil, err
}
switch item.Ty {
case pty.TyLogIssuanceCreate:
kv := c.deleteIssuanceStatus(&IssuanceLog)
set.KV = append(set.KV, kv...)
set.KV = append(set.KV, c.deleteIssuanceStatus(issuanceLog.Status, issuanceLog.Index)...)
break
case pty.TyLogIssuanceDebt:
set.KV = append(set.KV, c.deleteIssuanceRecordStatus(&IssuanceLog)...)
set.KV = append(set.KV, c.deleteIssuanceAddr(&IssuanceLog)...)
set.KV = append(set.KV, c.deleteIssuanceRecordStatus(issuanceLog.RecordStatus, issuanceLog.Index)...)
set.KV = append(set.KV, c.deleteIssuanceRecordAddr(issuanceLog.AccountAddr, issuanceLog.Index)...)
break
case pty.TyLogIssuanceRepay:
set.KV = append(set.KV, c.deleteIssuanceRecordStatus(&IssuanceLog)...)
set.KV = append(set.KV, c.addIssuanceAddr(&IssuanceLog)...)
set.KV = append(set.KV, c.addIssuanceRecordStatus(issuanceLog.RecordPreStatus, issuanceLog.AccountAddr, issuanceLog.PreIndex,
issuanceLog.DebtId, issuanceLog.IssuanceId)...)
set.KV = append(set.KV, c.deleteIssuanceRecordStatus(issuanceLog.RecordStatus, issuanceLog.Index)...)
set.KV = append(set.KV, c.addIssuanceRecordAddr(issuanceLog.AccountAddr, issuanceLog.PreIndex, issuanceLog.DebtId,
issuanceLog.IssuanceId)...)
break
case pty.TyLogIssuanceFeed:
set.KV = append(set.KV, c.deleteIssuanceRecordStatus(&IssuanceLog)...)
if IssuanceLog.RecordStatus == pty.IssuanceUserStatusSystemLiquidate {
set.KV = append(set.KV, c.addIssuanceAddr(&IssuanceLog)...)
set.KV = append(set.KV, c.addIssuanceRecordStatus(issuanceLog.RecordStatus, issuanceLog.AccountAddr, issuanceLog.PreIndex,
issuanceLog.DebtId, issuanceLog.IssuanceId)...)
set.KV = append(set.KV, c.deleteIssuanceRecordStatus(issuanceLog.RecordStatus, issuanceLog.Index)...)
set.KV = append(set.KV, c.addIssuanceRecordAddr(issuanceLog.AccountAddr, issuanceLog.PreIndex, issuanceLog.DebtId,
issuanceLog.IssuanceId)...)
// 如果没有被清算,需要把地址索引更新
if issuanceLog.RecordStatus == pty.IssuanceUserStatusWarning || issuanceLog.RecordStatus == pty.IssuanceUserStatusExpire {
set.KV = append(set.KV, c.deleteIssuanceRecordAddr(issuanceLog.AccountAddr, issuanceLog.Index)...)
}
break
case pty.TyLogIssuanceClose:
kv := c.addIssuanceStatus(&IssuanceLog)
set.KV = append(set.KV, kv...)
set.KV = append(set.KV, c.addIssuanceStatus(pty.IssuanceStatusCreated, issuanceLog.PreIndex, issuanceLog.IssuanceId)...)
break
}
}
......
......@@ -13,32 +13,41 @@ import (
func (c *Issuance) execLocal(tx *types.Transaction, receipt *types.ReceiptData) (*types.LocalDBSet, error) {
set := &types.LocalDBSet{}
for _, item := range receipt.Logs {
var IssuanceLog pty.ReceiptIssuance
err := types.Decode(item.Log, &IssuanceLog)
var issuanceLog pty.ReceiptIssuance
err := types.Decode(item.Log, &issuanceLog)
if err != nil {
return nil, err
}
switch item.Ty {
case pty.TyLogIssuanceCreate:
set.KV = append(set.KV, c.addIssuanceStatus(&IssuanceLog)...)
set.KV = append(set.KV, c.addIssuanceStatus(issuanceLog.Status, issuanceLog.Index, issuanceLog.IssuanceId)...)
break
case pty.TyLogIssuanceDebt:
set.KV = append(set.KV, c.addIssuanceRecordStatus(&IssuanceLog)...)
set.KV = append(set.KV, c.addIssuanceAddr(&IssuanceLog)...)
set.KV = append(set.KV, c.addIssuanceRecordStatus(issuanceLog.RecordStatus, issuanceLog.AccountAddr, issuanceLog.Index,
issuanceLog.DebtId, issuanceLog.IssuanceId)...)
set.KV = append(set.KV, c.addIssuanceRecordAddr(issuanceLog.AccountAddr, issuanceLog.Index, issuanceLog.DebtId,
issuanceLog.IssuanceId)...)
break
case pty.TyLogIssuanceRepay:
set.KV = append(set.KV, c.addIssuanceRecordStatus(&IssuanceLog)...)
set.KV = append(set.KV, c.deleteIssuanceAddr(&IssuanceLog)...)
set.KV = append(set.KV, c.deleteIssuanceRecordStatus(issuanceLog.RecordPreStatus, issuanceLog.PreIndex)...)
set.KV = append(set.KV, c.addIssuanceRecordStatus(issuanceLog.RecordStatus, issuanceLog.AccountAddr, issuanceLog.Index,
issuanceLog.DebtId, issuanceLog.IssuanceId)...)
set.KV = append(set.KV, c.deleteIssuanceRecordAddr(issuanceLog.AccountAddr, issuanceLog.PreIndex)...)
break
case pty.TyLogIssuanceFeed:
set.KV = append(set.KV, c.addIssuanceRecordStatus(&IssuanceLog)...)
if IssuanceLog.RecordStatus == pty.IssuanceUserStatusSystemLiquidate {
set.KV = append(set.KV, c.deleteIssuanceAddr(&IssuanceLog)...)
set.KV = append(set.KV, c.deleteIssuanceRecordStatus(issuanceLog.RecordPreStatus, issuanceLog.PreIndex)...)
set.KV = append(set.KV, c.addIssuanceRecordStatus(issuanceLog.RecordStatus, issuanceLog.AccountAddr, issuanceLog.Index,
issuanceLog.DebtId, issuanceLog.IssuanceId)...)
set.KV = append(set.KV, c.deleteIssuanceRecordAddr(issuanceLog.AccountAddr, issuanceLog.PreIndex)...)
// 如果没有被清算,需要把地址索引更新
if issuanceLog.RecordStatus == pty.IssuanceUserStatusWarning || issuanceLog.RecordStatus == pty.IssuanceUserStatusExpire {
set.KV = append(set.KV, c.addIssuanceRecordAddr(issuanceLog.AccountAddr, issuanceLog.Index, issuanceLog.DebtId,
issuanceLog.IssuanceId)...)
}
break
case pty.TyLogIssuanceClose:
set.KV = append(set.KV, c.deleteIssuanceStatus(&IssuanceLog)...)
set.KV = append(set.KV, c.deleteIssuanceStatus(issuanceLog.Status, issuanceLog.PreIndex)...)
break
}
}
......
......@@ -59,11 +59,11 @@ func (c *Issuance) GetDriverName() string {
return pty.IssuanceX
}
func (c *Issuance) addIssuanceID(issuancelog *pty.ReceiptIssuance) (kvs []*types.KeyValue) {
key := calcIssuanceKey(issuancelog.IssuanceId, issuancelog.Index)
func (c *Issuance) addIssuanceID(index int64, issuanceId string) (kvs []*types.KeyValue) {
key := calcIssuanceKey(issuanceId, index)
record := &pty.IssuanceRecord{
IssuanceId:issuancelog.IssuanceId,
Index: issuancelog.Index,
IssuanceId:issuanceId,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
......@@ -71,19 +71,19 @@ func (c *Issuance) addIssuanceID(issuancelog *pty.ReceiptIssuance) (kvs []*types
return kvs
}
func (c *Issuance) deleteIssuanceID(issuancelog *pty.ReceiptIssuance) (kvs []*types.KeyValue) {
key := calcIssuanceKey(issuancelog.IssuanceId, issuancelog.Index)
func (c *Issuance) deleteIssuanceID(index int64, issuanceId string) (kvs []*types.KeyValue) {
key := calcIssuanceKey(issuanceId, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
return kvs
}
func (c *Issuance) addIssuanceStatus(issuancelog *pty.ReceiptIssuance) (kvs []*types.KeyValue) {
key := calcIssuanceStatusKey(issuancelog.Status, issuancelog.Index)
func (c *Issuance) addIssuanceStatus(status int32, index int64, issuanceId string) (kvs []*types.KeyValue) {
key := calcIssuanceStatusKey(status, index)
record := &pty.IssuanceRecord{
IssuanceId:issuancelog.IssuanceId,
Index: issuancelog.Index,
IssuanceId:issuanceId,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
......@@ -91,19 +91,20 @@ func (c *Issuance) addIssuanceStatus(issuancelog *pty.ReceiptIssuance) (kvs []*t
return kvs
}
func (c *Issuance) deleteIssuanceStatus(issuancelog *pty.ReceiptIssuance) (kvs []*types.KeyValue) {
key := calcIssuanceStatusKey(issuancelog.Status, issuancelog.Index)
func (c *Issuance) deleteIssuanceStatus(status int32, index int64) (kvs []*types.KeyValue) {
key := calcIssuanceStatusKey(status, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
return kvs
}
func (c *Issuance) addIssuanceAddr(issuancelog *pty.ReceiptIssuance) (kvs []*types.KeyValue) {
key := calcIssuanceAddrKey(issuancelog.AccountAddr, issuancelog.Index)
func (c *Issuance) addIssuanceRecordAddr(accountAddr string, index int64, debtId string, issuanceId string) (kvs []*types.KeyValue) {
key := calcIssuanceRecordAddrKey(accountAddr, index)
record := &pty.IssuanceRecord{
IssuanceId:issuancelog.IssuanceId,
Index: issuancelog.Index,
IssuanceId:issuanceId,
DebtId: debtId,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
......@@ -111,21 +112,22 @@ func (c *Issuance) addIssuanceAddr(issuancelog *pty.ReceiptIssuance) (kvs []*typ
return kvs
}
func (c *Issuance) deleteIssuanceAddr(issuancelog *pty.ReceiptIssuance) (kvs []*types.KeyValue) {
key := calcIssuanceAddrKey(issuancelog.AccountAddr, issuancelog.Index)
func (c *Issuance) deleteIssuanceRecordAddr(accountAddr string, index int64) (kvs []*types.KeyValue) {
key := calcIssuanceRecordAddrKey(accountAddr, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
return kvs
}
func (c *Issuance) addIssuanceRecordStatus(issuancelog *pty.ReceiptIssuance) (kvs []*types.KeyValue) {
key := calcIssuanceRecordStatusKey(issuancelog.RecordStatus, issuancelog.Index)
func (c *Issuance) addIssuanceRecordStatus(recordStatus int32, accountAddr string, index int64, debtId string, issuanceId string) (kvs []*types.KeyValue) {
key := calcIssuanceRecordStatusKey(recordStatus, index)
record := &pty.IssuanceRecord{
IssuanceId:issuancelog.IssuanceId,
Addr: issuancelog.AccountAddr,
Index: issuancelog.Index,
IssuanceId:issuanceId,
DebtId: debtId,
Addr: accountAddr,
Index: index,
}
kv := &types.KeyValue{Key: key, Value: types.Encode(record)}
......@@ -133,8 +135,8 @@ func (c *Issuance) addIssuanceRecordStatus(issuancelog *pty.ReceiptIssuance) (kv
return kvs
}
func (c *Issuance) deleteIssuanceRecordStatus(issuancelog *pty.ReceiptIssuance) (kvs []*types.KeyValue) {
key := calcIssuanceRecordStatusKey(issuancelog.RecordStatus, issuancelog.Index)
func (c *Issuance) deleteIssuanceRecordStatus(status int32, index int64) (kvs []*types.KeyValue) {
key := calcIssuanceRecordStatusKey(status, index)
kv := &types.KeyValue{Key: key, Value: nil}
kvs = append(kvs, kv)
......
......@@ -157,21 +157,21 @@ func NewIssuanceAction(c *Issuance, tx *types.Transaction, index int) *Action {
}
// GetCollCommonRecipt generate logs for Issuance common action
func (action *Action) GetCollCommonRecipt(issuance *pty.Issuance, preStatus int32) *pty.ReceiptIssuance {
func (action *Action) GetCollCommonRecipt(issuance *pty.Issuance) *pty.ReceiptIssuance {
c := &pty.ReceiptIssuance{}
c.IssuanceId = issuance.IssuanceId
c.PreStatus = preStatus
c.Status = issuance.Status
c.Index = action.GetIndex()
c.Index = issuance.Index
c.PreIndex = issuance.PreIndex
return c
}
// GetCreateReceiptLog generate logs for Issuance create action
func (action *Action) GetCreateReceiptLog(issuance *pty.Issuance, preStatus int32) *types.ReceiptLog {
func (action *Action) GetCreateReceiptLog(issuance *pty.Issuance) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogIssuanceCreate
c := action.GetCollCommonRecipt(issuance, preStatus)
c := action.GetCollCommonRecipt(issuance)
log.Log = types.Encode(c)
......@@ -179,12 +179,14 @@ func (action *Action) GetCreateReceiptLog(issuance *pty.Issuance, preStatus int3
}
// GetDebtReceiptLog generate logs for Issuance debt action
func (action *Action) GetDebtReceiptLog(issuance *pty.Issuance, preStatus int32) *types.ReceiptLog {
func (action *Action) GetDebtReceiptLog(issuance *pty.Issuance, debtRecord *pty.DebtRecord) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogIssuanceDebt
c := action.GetCollCommonRecipt(issuance, preStatus)
c := action.GetCollCommonRecipt(issuance)
c.AccountAddr = action.fromaddr
c.DebtId = debtRecord.DebtId
c.RecordStatus = debtRecord.Status
log.Log = types.Encode(c)
......@@ -192,11 +194,15 @@ func (action *Action) GetDebtReceiptLog(issuance *pty.Issuance, preStatus int32)
}
// GetRepayReceiptLog generate logs for Issuance Repay action
func (action *Action) GetRepayReceiptLog(issuance *pty.Issuance, preStatus int32) *types.ReceiptLog {
func (action *Action) GetRepayReceiptLog(issuance *pty.Issuance, debtRecord *pty.DebtRecord) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogIssuanceRepay
c := action.GetCollCommonRecipt(issuance, preStatus)
c := action.GetCollCommonRecipt(issuance)
c.AccountAddr = action.fromaddr
c.DebtId = debtRecord.DebtId
c.RecordStatus = debtRecord.Status
c.RecordPreStatus = debtRecord.PreStatus
log.Log = types.Encode(c)
......@@ -208,9 +214,11 @@ func (action *Action) GetFeedReceiptLog(issuance *pty.Issuance, debtRecord *pty.
log := &types.ReceiptLog{}
log.Ty = pty.TyLogIssuanceFeed
c := action.GetCollCommonRecipt(issuance, debtRecord.PreStatus)
c := action.GetCollCommonRecipt(issuance)
c.AccountAddr = debtRecord.AccountAddr
c.DebtId = debtRecord.DebtId
c.RecordStatus = debtRecord.Status
c.RecordPreStatus = debtRecord.PreStatus
log.Log = types.Encode(c)
......@@ -218,11 +226,11 @@ func (action *Action) GetFeedReceiptLog(issuance *pty.Issuance, debtRecord *pty.
}
// GetCloseReceiptLog generate logs for Issuance close action
func (action *Action) GetCloseReceiptLog(Issuance *pty.Issuance, preStatus int32) *types.ReceiptLog {
func (action *Action) GetCloseReceiptLog(Issuance *pty.Issuance) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = pty.TyLogIssuanceClose
c := action.GetCollCommonRecipt(Issuance, preStatus)
c := action.GetCollCommonRecipt(Issuance)
log.Log = types.Encode(c)
......@@ -371,6 +379,8 @@ func (action *Action) IssuanceCreate(create *pty.IssuanceCreate) (*types.Receipt
issu.CreateTime = action.blocktime
issu.IssuerAddr = action.fromaddr
issu.Status = pty.IssuanceActionCreate
issu.Index = action.GetIndex()
issu.CreateIndex = issu.Index
clog.Debug("IssuanceCreate created", "IssuanceID", issuanceID, "TotalBalance", issu.TotalBalance)
......@@ -378,7 +388,7 @@ func (action *Action) IssuanceCreate(create *pty.IssuanceCreate) (*types.Receipt
issu.Save(action.db)
kv = append(kv, issu.GetKVSet()...)
receiptLog := action.GetCreateReceiptLog(&issu.Issuance, 0)
receiptLog := action.GetCreateReceiptLog(&issu.Issuance)
logs = append(logs, receiptLog)
receipt = &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}
......@@ -405,7 +415,7 @@ func (action *Action)getLatestPrice(db dbm.KV) (float32, error) {
clog.Debug("getLatestPrice", "get", err)
return -1, err
}
var price pty.AssetPriceRecord
var price pty.IssuanceAssetPriceRecord
//decode
err = types.Decode(data, &price)
if err != nil {
......@@ -458,15 +468,14 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
return nil, pty.ErrIssuanceStatus
}
// 一个地址在一期借贷中只允许借出一次
for _, record := range issuance.DebtRecords {
if record.AccountAddr == action.fromaddr {
clog.Error("IssuanceDebt","IssuanceId", debt.IssuanceId, action.fromaddr, "execaddr", action.execaddr, "err", pty.ErrIssuanceAccountExist)
return nil, err
}
}
//// 一个地址在一期借贷中只允许借出一次
//for _, record := range issuance.DebtRecords {
// if record.AccountAddr == action.fromaddr {
// clog.Error("IssuanceDebt","IssuanceId", debt.IssuanceId, action.fromaddr, "execaddr", action.execaddr, "err", pty.ErrIssuanceAccountExist)
// return nil, err
// }
//}
issu := &IssuanceDB{*issuance}
preStatus := issu.Status
// 借贷金额检查
if debt.GetValue() <= 0 {
......@@ -537,6 +546,7 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
// 构造借出记录
debtRecord := &pty.DebtRecord{}
debtRecord.AccountAddr = action.fromaddr
debtRecord.DebtId = common.ToHex(action.txhash)
debtRecord.CollateralValue = btyFrozen
debtRecord.StartTime = action.blocktime
debtRecord.CollateralPrice = lastPrice
......@@ -555,10 +565,12 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
issu.CollateralValue += btyFrozen
issu.DebtValue += debt.Value
issu.Balance -= debt.Value
issu.PreIndex = issu.Index
issu.Index = action.GetIndex()
issu.Save(action.db)
kv = append(kv, issu.GetKVSet()...)
receiptLog := action.GetDebtReceiptLog(&issu.Issuance, preStatus)
receiptLog := action.GetDebtReceiptLog(&issu.Issuance, debtRecord)
logs = append(logs, receiptLog)
receipt = &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}
......@@ -579,7 +591,6 @@ func (action *Action) IssuanceRepay(repay *pty.IssuanceRepay) (*types.Receipt, e
}
issu := &IssuanceDB{*issuance}
preStatus := issu.Status
// 状态检查
if issu.Status != pty.IssuanceStatusCreated {
......@@ -591,7 +602,7 @@ func (action *Action) IssuanceRepay(repay *pty.IssuanceRepay) (*types.Receipt, e
var debtRecord *pty.DebtRecord
var index int
for i, record := range issu.DebtRecords {
if record.AccountAddr == action.fromaddr {
if record.DebtId == repay.DebtId {
debtRecord = record
index = i
break
......@@ -639,10 +650,12 @@ func (action *Action) IssuanceRepay(repay *pty.IssuanceRepay) (*types.Receipt, e
issu.InvalidRecords = append(issu.InvalidRecords, debtRecord)
issu.LatestLiquidationPrice = getLatestLiquidationPrice(&issu.Issuance)
issu.LatestExpireTime = getLatestExpireTime(&issu.Issuance)
issu.PreIndex = issu.Index
issu.Index = action.GetIndex()
issu.Save(action.db)
kv = append(kv, issu.GetKVSet()...)
receiptLog := action.GetRepayReceiptLog(&issu.Issuance, preStatus)
receiptLog := action.GetRepayReceiptLog(&issu.Issuance, debtRecord)
logs = append(logs, receiptLog)
receipt = &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}
......@@ -692,6 +705,8 @@ func (action *Action) systemLiquidation(issu *pty.Issuance, price float32) (*typ
debtRecord.PreStatus = debtRecord.Status
debtRecord.Status = pty.IssuanceUserStatusWarning
}
issu.PreIndex = issu.Index
issu.Index = action.GetIndex()
log := action.GetFeedReceiptLog(issu, debtRecord)
logs = append(logs, log)
......@@ -746,6 +761,8 @@ func (action *Action) expireLiquidation(issu *pty.Issuance) (*types.Receipt, err
debtRecord.PreStatus = debtRecord.Status
debtRecord.Status = pty.IssuanceUserStatusExpire
}
issu.PreIndex = issu.Index
issu.Index = action.GetIndex()
log := action.GetFeedReceiptLog(issu, debtRecord)
logs = append(logs, log)
......@@ -832,7 +849,7 @@ func (action *Action) IssuanceFeed(feed *pty.IssuanceFeed) (*types.Receipt, erro
kv = append(kv, receipt.KV...)
}
var priceRecord pty.AssetPriceRecord
var priceRecord pty.IssuanceAssetPriceRecord
priceRecord.BtyPrice = price
priceRecord.RecordTime = action.blocktime
......@@ -871,34 +888,37 @@ func (action *Action) IssuanceClose(close *pty.IssuanceClose) (*types.Receipt, e
clog.Debug("IssuanceClose", "ID", close.IssuanceId)
issu := &IssuanceDB{*issuance}
preStatus := issu.Status
issu.Status = pty.IssuanceStatusClose
issu.PreIndex = issu.CreateIndex
issu.Index = action.GetIndex()
issu.Save(action.db)
kv = append(kv, issu.GetKVSet()...)
receiptLog := action.GetCloseReceiptLog(&issu.Issuance, preStatus)
receiptLog := action.GetCloseReceiptLog(&issu.Issuance)
logs = append(logs, receiptLog)
return &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}, nil
}
// 查找借贷
func queryIssuanceByID(db dbm.KV, IssuanceID string) (*pty.Issuance, error) {
data, err := db.Get(Key(IssuanceID))
// 根据ID查找发行信息
func queryIssuanceByID(db dbm.KV, issuanceID string) (*pty.Issuance, error) {
data, err := db.Get(Key(issuanceID))
if err != nil {
clog.Debug("queryIssuanceByID", "error", err)
clog.Error("queryIssuanceByID", "error", err)
return nil, err
}
var issu pty.Issuance
err = types.Decode(data, &issu)
if err != nil {
clog.Debug("queryIssuanceByID", "decode", err)
clog.Error("queryIssuanceByID", "decode", err)
return nil, err
}
return &issu, nil
}
// 根据发行状态查找发行ID
func queryIssuanceByStatus(localdb dbm.Lister, status int32) ([]*pty.IssuanceRecord, error) {
data, err := localdb.List(calcIssuanceStatusPrefix(status), nil, DefultCount, ListDESC)
if err != nil {
......@@ -920,44 +940,88 @@ func queryIssuanceByStatus(localdb dbm.Lister, status int32) ([]*pty.IssuanceRec
return colls, nil
}
func queryIssuanceByAddr(localdb dbm.Lister, addr string) ([]*pty.IssuanceRecord, error) {
data, err := localdb.List(calcIssuanceAddrPrefix(addr), nil, DefultCount, ListDESC)
// 精确查找发行记录
func queryIssuanceRecordByID(db dbm.KV, issuanceID string, debtID string) (*pty.DebtRecord, error) {
issu, err := queryIssuanceByID(db, issuanceID)
if err != nil {
clog.Debug("queryIssuancesByAddr", "error", err)
clog.Error("queryIssuanceRecordByID", "error", err)
return nil, err
}
var colls []*pty.IssuanceRecord
for _, record := range issu.DebtRecords {
if record.DebtId == debtID {
return record, nil
}
}
for _, record := range issu.InvalidRecords {
if record.DebtId == debtID {
return record, nil
}
}
return nil, types.ErrNotFound
}
// 根据发行状态查找
func queryIssuanceRecordsByStatus(db dbm.KV, localdb dbm.Lister, status int32) ([]*pty.DebtRecord, error) {
var statusKey string
if status == 0 {
statusKey = ""
} else {
statusKey = string(status)
}
data, err := localdb.List(calcIssuanceRecordStatusPrefix(statusKey), nil, DefultCount, ListDESC)
if err != nil {
clog.Error("queryIssuanceRecordsByStatus", "error", err)
return nil, err
}
var records []*pty.DebtRecord
var issu pty.IssuanceRecord
for _, collBytes := range data {
err = types.Decode(collBytes, &issu)
if err != nil {
clog.Debug("queryIssuancesByAddr", "decode", err)
clog.Error("queryIssuanceRecordsByStatus", "decode", err)
return nil, err
}
colls = append(colls, &issu)
record, err := queryIssuanceRecordByID(db, issu.IssuanceId, issu.DebtId)
if err != nil {
clog.Error("queryIssuanceRecordsByStatus", "decode", err)
return nil, err
}
records = append(records, record)
}
return colls, nil
return records, nil
}
func queryIssuanceRecordByStatus(localdb dbm.Lister, status int32) ([]*pty.IssuanceRecord, error) {
data, err := localdb.List(calcIssuanceRecordStatusPrefix(status), nil, DefultCount, ListDESC)
// 根据用户地址查找
func queryIssuanceRecordByAddr(db dbm.KV, localdb dbm.Lister, addr string) ([]*pty.DebtRecord, error) {
data, err := localdb.List(calcIssuanceRecordAddrPrefix(addr), nil, DefultCount, ListDESC)
if err != nil {
clog.Debug("queryIssuanceRecordByStatus", "error", err)
clog.Error("queryIssuanceRecordByAddr", "error", err)
return nil, err
}
var colls []*pty.IssuanceRecord
var records []*pty.DebtRecord
var issu pty.IssuanceRecord
for _, collBytes := range data {
err = types.Decode(collBytes, &issu)
if err != nil {
clog.Debug("queryIssuancesByStatus", "decode", err)
clog.Error("queryIssuanceRecordByAddr", "decode", err)
return nil, err
}
colls = append(colls, &issu)
record, err := queryIssuanceRecordByID(db, issu.IssuanceId, issu.DebtId)
if err != nil {
clog.Error("queryIssuanceRecordByAddr", "decode", err)
return nil, err
}
records = append(records, record)
}
return colls, nil
return records, nil
}
......@@ -21,13 +21,13 @@ func calcIssuanceStatusKey(status int32, index int64) []byte {
return []byte(key)
}
func calcIssuanceAddrPrefix(addr string) []byte {
key := fmt.Sprintf("LODB-Issuance-addr:%s", addr)
func calcIssuanceRecordAddrPrefix(addr string) []byte {
key := fmt.Sprintf("LODB-Issuance-record-addr:%s", addr)
return []byte(key)
}
func calcIssuanceAddrKey(addr string, index int64) []byte {
key := fmt.Sprintf("LODB-Issuance-addr:%s:%018d", addr, index)
func calcIssuanceRecordAddrKey(addr string, index int64) []byte {
key := fmt.Sprintf("LODB-Issuance-record-addr:%s:%018d", addr, index)
return []byte(key)
}
......@@ -41,8 +41,8 @@ func calcIssuanceLatestPriceKey() []byte {
return []byte(key)
}
func calcIssuanceRecordStatusPrefix(status int32) []byte {
key := fmt.Sprintf("LODB-Issuance-record-status:%d", status)
func calcIssuanceRecordStatusPrefix(status string) []byte {
key := fmt.Sprintf("LODB-Issuance-record-status:%s", status)
return []byte(key)
}
......
......@@ -61,81 +61,38 @@ func (c *Issuance) Query_IssuanceByStatus(req *pty.ReqIssuanceByStatus) (types.M
return ids, nil
}
func (c *Issuance) Query_IssuanceByAddr(req *pty.ReqIssuanceByAddr) (types.Message, error) {
ids := &pty.RepIssuanceIDs{}
issuIDRecords, err := queryIssuanceByAddr(c.GetLocalDB(), req.Addr)
func (c *Issuance) Query_IssuanceRecordByID(req *pty.ReqIssuanceDebtInfo) (types.Message, error) {
issuRecord, err := queryIssuanceRecordByID(c.GetStateDB(), req.IssuanceId, req.DebtId)
if err != nil {
clog.Error("Query_IssuanceByAddr", "get issuance record error", err)
clog.Error("Query_IssuanceRecordByID", "get issuance record error", err)
return nil, err
}
for _, record := range issuIDRecords {
ids.IDs = append(ids.IDs, record.IssuanceId)
}
return ids, nil
ret := &pty.RepIssuanceDebtInfo{}
ret.Record = issuRecord
return issuRecord, nil
}
func (c *Issuance) Query_IssuanceDebtInfoByAddr(req *pty.ReqIssuanceDebtInfoByAddr) (types.Message, error) {
records, err := queryIssuanceByAddr(c.GetLocalDB(), req.Addr)
if err != nil {
clog.Error("Query_IssuanceDebtInfoByAddr", "get issuance record error", err)
return nil, err
}
ret := &pty.RepIssuanceDebtInfos{}
for _, record := range records {
if record.IssuanceId == req.IssuanceId {
issu, err := queryIssuanceByID(c.GetStateDB(), record.IssuanceId)
func (c *Issuance) Query_IssuanceRecordsByAddr(req *pty.ReqIssuanceRecordsByAddr) (types.Message, error) {
records, err := queryIssuanceRecordByAddr(c.GetStateDB(), c.GetLocalDB(), req.Addr)
if err != nil {
clog.Error("Query_IssuanceDebtInfoByAddr", "get issuance record error", err)
return nil, err
}
for _, borrowRecord := range issu.DebtRecords {
if borrowRecord.AccountAddr == req.Addr {
ret.Record = append(ret.Record, borrowRecord)
}
}
for _, borrowRecord := range issu.InvalidRecords {
if borrowRecord.AccountAddr == req.Addr {
ret.Record = append(ret.Record, borrowRecord)
}
}
}
}
return nil, pty.ErrRecordNotExist
ret := &pty.RepIssuanceRecords{}
ret.Records = records
return ret, nil
}
func (c *Issuance) Query_IssuanceDebtInfoByStatus(req *pty.ReqIssuanceDebtInfoByStatus) (types.Message, error) {
records, err := queryIssuanceRecordByStatus(c.GetLocalDB(), req.Status)
if err != nil {
clog.Error("Query_IssuanceDebtInfoByAddr", "get issuance record error", err)
return nil, err
}
ret := &pty.RepIssuanceDebtInfos{}
for _, record := range records {
issu, err := queryIssuanceByID(c.GetStateDB(), record.IssuanceId)
func (c *Issuance) Query_IssuanceRecordsByStatus(req *pty.ReqIssuanceRecordsByStatus) (types.Message, error) {
records, err := queryIssuanceRecordsByStatus(c.GetStateDB(), c.GetLocalDB(), req.Status)
if err != nil {
clog.Error("Query_IssuanceDebtInfoByAddr", "get issuance record error", err)
return nil, err
}
for _, borrowRecord := range issu.DebtRecords {
if borrowRecord.Status == req.Status {
ret.Record = append(ret.Record, borrowRecord)
}
}
for _, borrowRecord := range issu.InvalidRecords {
if borrowRecord.Status == req.Status {
ret.Record = append(ret.Record, borrowRecord)
}
}
}
ret := &pty.RepIssuanceRecords{}
ret.Records = records
return ret, nil
}
\ No newline at end of file
......@@ -19,6 +19,9 @@ message Issuance {
int64 createTime = 13;//创建时间
int64 balance = 14;//剩余可发行ccny
string issuerAddr = 15;//发行地址
int64 index = 16;//当前索引
int64 preIndex = 17;//上级索引
int64 createIndex = 18;//创建索引,用于close删除状态
}
// 抵押记录
......@@ -33,10 +36,11 @@ message DebtRecord {
int64 liquidateTime = 8; //清算时间
int64 expireTime = 9; //超时清算时间
int32 preStatus = 10;//上一次抵押状态,用于告警恢复
string debtId = 11;//借贷id
}
// 资产价格记录
message AssetPriceRecord {
message IssuanceAssetPriceRecord {
int64 recordTime = 1; //价格记录时间
float btyPrice = 2; //bty价格
}
......@@ -68,13 +72,14 @@ message IssuanceCreate {
// 质押借出
message IssuanceDebt {
string IssuanceId = 1; //借贷期数ID
string issuanceId = 1; //借贷期数ID
int64 value = 2; //借贷价值(ccny)
}
// 质押清算
message IssuanceRepay {
string IssuanceId = 1; //借贷期数ID
string issuanceId = 1; //借贷期数ID
string debtId = 2; //借贷ID
}
// 喂价
......@@ -86,24 +91,27 @@ message IssuanceFeed {
// 借贷关闭
message IssuanceClose {
string IssuanceId = 1; //借贷期数ID
string issuanceId = 1; //借贷期数ID
}
// exec_local 借贷信息
message ReceiptIssuance {
string IssuanceId = 1;
string issuanceId = 1;
string accountAddr = 2;
int32 status = 3;
int32 preStatus = 4;
int64 index = 5;
int32 recordStatus = 6;
string debtId = 4;
int32 recordStatus = 5;
int32 recordPreStatus = 6;
int64 index = 7;
int64 preIndex = 8;
}
// exec_local 借贷记录信息
message IssuanceRecord {
string IssuanceId = 1;
string issuanceId = 1;
string addr = 2;
int64 index = 3;
string debtId = 3;
int64 index = 4;
}
// exec_local 借贷记录信息列表
......@@ -113,7 +121,7 @@ message IssuanceRecords {
// 根据ID查询一期借贷信息
message ReqIssuanceInfo {
string IssuanceId = 1;
string issuanceId = 1;
}
// 返回一期借贷信息
......@@ -129,7 +137,7 @@ message RepIssuanceCurrentInfo {
// 根据ID列表查询多期借贷信息
message ReqIssuanceInfos {
repeated string IssuanceIds = 1;
repeated string issuanceIds = 1;
}
// 返回多期借贷信息
......@@ -137,34 +145,40 @@ message RepIssuanceCurrentInfos {
repeated RepIssuanceCurrentInfo infos = 1;
}
// 根据借贷状态查询
// 根据发行状态查询
message ReqIssuanceByStatus {
int32 status = 1;
}
// 根据用户地址查询
message ReqIssuanceByAddr {
string addr = 1;
}
// 返回借贷ID列表
message RepIssuanceIDs {
repeated string IDs = 1;
}
// 根据地址和借贷ID混合查询具体借贷记录
message ReqIssuanceDebtInfoByAddr {
string IssuanceId = 1;
// 根据用户地址查询发行记录
message ReqIssuanceRecordsByAddr {
string issuanceId = 1;
string addr = 2;
}
// 根据状态和借贷ID混合查询具体借贷记录
message ReqIssuanceDebtInfoByStatus {
string IssuanceId = 1;
// 根据状态查询发行记录
message ReqIssuanceRecordsByStatus {
string issuanceId = 1;
int32 status = 2;
}
// 返回借贷记录
message RepIssuanceDebtInfos {
repeated DebtRecord record = 1;
// 返回记录列表
message RepIssuanceRecords {
repeated DebtRecord records = 1;
}
// 精确查找发行记录
message ReqIssuanceDebtInfo {
string issuanceId = 1;
string debtId = 2;
}
// 返回记录
message RepIssuanceDebtInfo {
DebtRecord record = 1;
}
......@@ -37,6 +37,9 @@ type Issuance struct {
CreateTime int64 `protobuf:"varint,13,opt,name=createTime,proto3" json:"createTime,omitempty"`
Balance int64 `protobuf:"varint,14,opt,name=balance,proto3" json:"balance,omitempty"`
IssuerAddr string `protobuf:"bytes,15,opt,name=issuerAddr,proto3" json:"issuerAddr,omitempty"`
Index int64 `protobuf:"varint,16,opt,name=index,proto3" json:"index,omitempty"`
PreIndex int64 `protobuf:"varint,17,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
CreateIndex int64 `protobuf:"varint,18,opt,name=createIndex,proto3" json:"createIndex,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -172,6 +175,27 @@ func (m *Issuance) GetIssuerAddr() string {
return ""
}
func (m *Issuance) GetIndex() int64 {
if m != nil {
return m.Index
}
return 0
}
func (m *Issuance) GetPreIndex() int64 {
if m != nil {
return m.PreIndex
}
return 0
}
func (m *Issuance) GetCreateIndex() int64 {
if m != nil {
return m.CreateIndex
}
return 0
}
// 抵押记录
type DebtRecord struct {
AccountAddr string `protobuf:"bytes,1,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
......@@ -184,6 +208,7 @@ type DebtRecord struct {
LiquidateTime int64 `protobuf:"varint,8,opt,name=liquidateTime,proto3" json:"liquidateTime,omitempty"`
ExpireTime int64 `protobuf:"varint,9,opt,name=expireTime,proto3" json:"expireTime,omitempty"`
PreStatus int32 `protobuf:"varint,10,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
DebtId string `protobuf:"bytes,11,opt,name=debtId,proto3" json:"debtId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -284,8 +309,15 @@ func (m *DebtRecord) GetPreStatus() int32 {
return 0
}
func (m *DebtRecord) GetDebtId() string {
if m != nil {
return m.DebtId
}
return ""
}
// 资产价格记录
type AssetPriceRecord struct {
type IssuanceAssetPriceRecord struct {
RecordTime int64 `protobuf:"varint,1,opt,name=recordTime,proto3" json:"recordTime,omitempty"`
BtyPrice float32 `protobuf:"fixed32,2,opt,name=btyPrice,proto3" json:"btyPrice,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
......@@ -293,39 +325,39 @@ type AssetPriceRecord struct {
XXX_sizecache int32 `json:"-"`
}
func (m *AssetPriceRecord) Reset() { *m = AssetPriceRecord{} }
func (m *AssetPriceRecord) String() string { return proto.CompactTextString(m) }
func (*AssetPriceRecord) ProtoMessage() {}
func (*AssetPriceRecord) Descriptor() ([]byte, []int) {
func (m *IssuanceAssetPriceRecord) Reset() { *m = IssuanceAssetPriceRecord{} }
func (m *IssuanceAssetPriceRecord) String() string { return proto.CompactTextString(m) }
func (*IssuanceAssetPriceRecord) ProtoMessage() {}
func (*IssuanceAssetPriceRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{2}
}
func (m *AssetPriceRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AssetPriceRecord.Unmarshal(m, b)
func (m *IssuanceAssetPriceRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IssuanceAssetPriceRecord.Unmarshal(m, b)
}
func (m *AssetPriceRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AssetPriceRecord.Marshal(b, m, deterministic)
func (m *IssuanceAssetPriceRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IssuanceAssetPriceRecord.Marshal(b, m, deterministic)
}
func (m *AssetPriceRecord) XXX_Merge(src proto.Message) {
xxx_messageInfo_AssetPriceRecord.Merge(m, src)
func (m *IssuanceAssetPriceRecord) XXX_Merge(src proto.Message) {
xxx_messageInfo_IssuanceAssetPriceRecord.Merge(m, src)
}
func (m *AssetPriceRecord) XXX_Size() int {
return xxx_messageInfo_AssetPriceRecord.Size(m)
func (m *IssuanceAssetPriceRecord) XXX_Size() int {
return xxx_messageInfo_IssuanceAssetPriceRecord.Size(m)
}
func (m *AssetPriceRecord) XXX_DiscardUnknown() {
xxx_messageInfo_AssetPriceRecord.DiscardUnknown(m)
func (m *IssuanceAssetPriceRecord) XXX_DiscardUnknown() {
xxx_messageInfo_IssuanceAssetPriceRecord.DiscardUnknown(m)
}
var xxx_messageInfo_AssetPriceRecord proto.InternalMessageInfo
var xxx_messageInfo_IssuanceAssetPriceRecord proto.InternalMessageInfo
func (m *AssetPriceRecord) GetRecordTime() int64 {
func (m *IssuanceAssetPriceRecord) GetRecordTime() int64 {
if m != nil {
return m.RecordTime
}
return 0
}
func (m *AssetPriceRecord) GetBtyPrice() float32 {
func (m *IssuanceAssetPriceRecord) GetBtyPrice() float32 {
if m != nil {
return m.BtyPrice
}
......@@ -586,7 +618,7 @@ func (m *IssuanceCreate) GetPeriod() int64 {
// 质押借出
type IssuanceDebt struct {
IssuanceId string `protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -634,7 +666,8 @@ func (m *IssuanceDebt) GetValue() int64 {
// 质押清算
type IssuanceRepay struct {
IssuanceId string `protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
DebtId string `protobuf:"bytes,2,opt,name=debtId,proto3" json:"debtId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -672,6 +705,13 @@ func (m *IssuanceRepay) GetIssuanceId() string {
return ""
}
func (m *IssuanceRepay) GetDebtId() string {
if m != nil {
return m.DebtId
}
return ""
}
// 喂价
type IssuanceFeed struct {
CollType int32 `protobuf:"varint,1,opt,name=collType,proto3" json:"collType,omitempty"`
......@@ -730,7 +770,7 @@ func (m *IssuanceFeed) GetVolume() []int64 {
// 借贷关闭
type IssuanceClose struct {
IssuanceId string `protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -770,12 +810,14 @@ func (m *IssuanceClose) GetIssuanceId() string {
// exec_local 借贷信息
type ReceiptIssuance struct {
IssuanceId string `protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
AccountAddr string `protobuf:"bytes,2,opt,name=accountAddr,proto3" json:"accountAddr,omitempty"`
Status int32 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
PreStatus int32 `protobuf:"varint,4,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
RecordStatus int32 `protobuf:"varint,6,opt,name=recordStatus,proto3" json:"recordStatus,omitempty"`
DebtId string `protobuf:"bytes,4,opt,name=debtId,proto3" json:"debtId,omitempty"`
RecordStatus int32 `protobuf:"varint,5,opt,name=recordStatus,proto3" json:"recordStatus,omitempty"`
RecordPreStatus int32 `protobuf:"varint,6,opt,name=recordPreStatus,proto3" json:"recordPreStatus,omitempty"`
Index int64 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"`
PreIndex int64 `protobuf:"varint,8,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -827,9 +869,23 @@ func (m *ReceiptIssuance) GetStatus() int32 {
return 0
}
func (m *ReceiptIssuance) GetPreStatus() int32 {
func (m *ReceiptIssuance) GetDebtId() string {
if m != nil {
return m.PreStatus
return m.DebtId
}
return ""
}
func (m *ReceiptIssuance) GetRecordStatus() int32 {
if m != nil {
return m.RecordStatus
}
return 0
}
func (m *ReceiptIssuance) GetRecordPreStatus() int32 {
if m != nil {
return m.RecordPreStatus
}
return 0
}
......@@ -841,18 +897,19 @@ func (m *ReceiptIssuance) GetIndex() int64 {
return 0
}
func (m *ReceiptIssuance) GetRecordStatus() int32 {
func (m *ReceiptIssuance) GetPreIndex() int64 {
if m != nil {
return m.RecordStatus
return m.PreIndex
}
return 0
}
// exec_local 借贷记录信息
type IssuanceRecord struct {
IssuanceId string `protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Index int64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
DebtId string `protobuf:"bytes,3,opt,name=debtId,proto3" json:"debtId,omitempty"`
Index int64 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -897,6 +954,13 @@ func (m *IssuanceRecord) GetAddr() string {
return ""
}
func (m *IssuanceRecord) GetDebtId() string {
if m != nil {
return m.DebtId
}
return ""
}
func (m *IssuanceRecord) GetIndex() int64 {
if m != nil {
return m.Index
......@@ -946,7 +1010,7 @@ func (m *IssuanceRecords) GetRecords() []*IssuanceRecord {
// 根据ID查询一期借贷信息
type ReqIssuanceInfo struct {
IssuanceId string `protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -1074,7 +1138,7 @@ func (m *RepIssuanceCurrentInfo) GetDebtValue() int64 {
// 根据ID列表查询多期借贷信息
type ReqIssuanceInfos struct {
IssuanceIds []string `protobuf:"bytes,1,rep,name=IssuanceIds,proto3" json:"IssuanceIds,omitempty"`
IssuanceIds []string `protobuf:"bytes,1,rep,name=issuanceIds,proto3" json:"issuanceIds,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -1152,7 +1216,7 @@ func (m *RepIssuanceCurrentInfos) GetInfos() []*RepIssuanceCurrentInfo {
return nil
}
// 根据借贷状态查询
// 根据发行状态查询
type ReqIssuanceByStatus struct {
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
......@@ -1192,46 +1256,6 @@ func (m *ReqIssuanceByStatus) GetStatus() int32 {
return 0
}
// 根据用户地址查询
type ReqIssuanceByAddr struct {
Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqIssuanceByAddr) Reset() { *m = ReqIssuanceByAddr{} }
func (m *ReqIssuanceByAddr) String() string { return proto.CompactTextString(m) }
func (*ReqIssuanceByAddr) ProtoMessage() {}
func (*ReqIssuanceByAddr) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{18}
}
func (m *ReqIssuanceByAddr) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqIssuanceByAddr.Unmarshal(m, b)
}
func (m *ReqIssuanceByAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqIssuanceByAddr.Marshal(b, m, deterministic)
}
func (m *ReqIssuanceByAddr) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqIssuanceByAddr.Merge(m, src)
}
func (m *ReqIssuanceByAddr) XXX_Size() int {
return xxx_messageInfo_ReqIssuanceByAddr.Size(m)
}
func (m *ReqIssuanceByAddr) XXX_DiscardUnknown() {
xxx_messageInfo_ReqIssuanceByAddr.DiscardUnknown(m)
}
var xxx_messageInfo_ReqIssuanceByAddr proto.InternalMessageInfo
func (m *ReqIssuanceByAddr) GetAddr() string {
if m != nil {
return m.Addr
}
return ""
}
// 返回借贷ID列表
type RepIssuanceIDs struct {
IDs []string `protobuf:"bytes,1,rep,name=IDs,proto3" json:"IDs,omitempty"`
......@@ -1244,7 +1268,7 @@ func (m *RepIssuanceIDs) Reset() { *m = RepIssuanceIDs{} }
func (m *RepIssuanceIDs) String() string { return proto.CompactTextString(m) }
func (*RepIssuanceIDs) ProtoMessage() {}
func (*RepIssuanceIDs) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{19}
return fileDescriptor_7110f4228953d675, []int{18}
}
func (m *RepIssuanceIDs) XXX_Unmarshal(b []byte) error {
......@@ -1272,136 +1296,224 @@ func (m *RepIssuanceIDs) GetIDs() []string {
return nil
}
// 根据地址和借贷ID混合查询具体借贷记录
type ReqIssuanceDebtInfoByAddr struct {
IssuanceId string `protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
// 根据用户地址查询发行记录
type ReqIssuanceRecordsByAddr struct {
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqIssuanceDebtInfoByAddr) Reset() { *m = ReqIssuanceDebtInfoByAddr{} }
func (m *ReqIssuanceDebtInfoByAddr) String() string { return proto.CompactTextString(m) }
func (*ReqIssuanceDebtInfoByAddr) ProtoMessage() {}
func (*ReqIssuanceDebtInfoByAddr) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{20}
func (m *ReqIssuanceRecordsByAddr) Reset() { *m = ReqIssuanceRecordsByAddr{} }
func (m *ReqIssuanceRecordsByAddr) String() string { return proto.CompactTextString(m) }
func (*ReqIssuanceRecordsByAddr) ProtoMessage() {}
func (*ReqIssuanceRecordsByAddr) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{19}
}
func (m *ReqIssuanceDebtInfoByAddr) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqIssuanceDebtInfoByAddr.Unmarshal(m, b)
func (m *ReqIssuanceRecordsByAddr) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqIssuanceRecordsByAddr.Unmarshal(m, b)
}
func (m *ReqIssuanceDebtInfoByAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqIssuanceDebtInfoByAddr.Marshal(b, m, deterministic)
func (m *ReqIssuanceRecordsByAddr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqIssuanceRecordsByAddr.Marshal(b, m, deterministic)
}
func (m *ReqIssuanceDebtInfoByAddr) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqIssuanceDebtInfoByAddr.Merge(m, src)
func (m *ReqIssuanceRecordsByAddr) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqIssuanceRecordsByAddr.Merge(m, src)
}
func (m *ReqIssuanceDebtInfoByAddr) XXX_Size() int {
return xxx_messageInfo_ReqIssuanceDebtInfoByAddr.Size(m)
func (m *ReqIssuanceRecordsByAddr) XXX_Size() int {
return xxx_messageInfo_ReqIssuanceRecordsByAddr.Size(m)
}
func (m *ReqIssuanceDebtInfoByAddr) XXX_DiscardUnknown() {
xxx_messageInfo_ReqIssuanceDebtInfoByAddr.DiscardUnknown(m)
func (m *ReqIssuanceRecordsByAddr) XXX_DiscardUnknown() {
xxx_messageInfo_ReqIssuanceRecordsByAddr.DiscardUnknown(m)
}
var xxx_messageInfo_ReqIssuanceDebtInfoByAddr proto.InternalMessageInfo
var xxx_messageInfo_ReqIssuanceRecordsByAddr proto.InternalMessageInfo
func (m *ReqIssuanceDebtInfoByAddr) GetIssuanceId() string {
func (m *ReqIssuanceRecordsByAddr) GetIssuanceId() string {
if m != nil {
return m.IssuanceId
}
return ""
}
func (m *ReqIssuanceDebtInfoByAddr) GetAddr() string {
func (m *ReqIssuanceRecordsByAddr) GetAddr() string {
if m != nil {
return m.Addr
}
return ""
}
// 根据状态和借贷ID混合查询具体借贷记录
type ReqIssuanceDebtInfoByStatus struct {
IssuanceId string `protobuf:"bytes,1,opt,name=IssuanceId,proto3" json:"IssuanceId,omitempty"`
// 根据状态查询发行记录
type ReqIssuanceRecordsByStatus struct {
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqIssuanceDebtInfoByStatus) Reset() { *m = ReqIssuanceDebtInfoByStatus{} }
func (m *ReqIssuanceDebtInfoByStatus) String() string { return proto.CompactTextString(m) }
func (*ReqIssuanceDebtInfoByStatus) ProtoMessage() {}
func (*ReqIssuanceDebtInfoByStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{21}
func (m *ReqIssuanceRecordsByStatus) Reset() { *m = ReqIssuanceRecordsByStatus{} }
func (m *ReqIssuanceRecordsByStatus) String() string { return proto.CompactTextString(m) }
func (*ReqIssuanceRecordsByStatus) ProtoMessage() {}
func (*ReqIssuanceRecordsByStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{20}
}
func (m *ReqIssuanceDebtInfoByStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqIssuanceDebtInfoByStatus.Unmarshal(m, b)
func (m *ReqIssuanceRecordsByStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqIssuanceRecordsByStatus.Unmarshal(m, b)
}
func (m *ReqIssuanceDebtInfoByStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqIssuanceDebtInfoByStatus.Marshal(b, m, deterministic)
func (m *ReqIssuanceRecordsByStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqIssuanceRecordsByStatus.Marshal(b, m, deterministic)
}
func (m *ReqIssuanceDebtInfoByStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqIssuanceDebtInfoByStatus.Merge(m, src)
func (m *ReqIssuanceRecordsByStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqIssuanceRecordsByStatus.Merge(m, src)
}
func (m *ReqIssuanceDebtInfoByStatus) XXX_Size() int {
return xxx_messageInfo_ReqIssuanceDebtInfoByStatus.Size(m)
func (m *ReqIssuanceRecordsByStatus) XXX_Size() int {
return xxx_messageInfo_ReqIssuanceRecordsByStatus.Size(m)
}
func (m *ReqIssuanceDebtInfoByStatus) XXX_DiscardUnknown() {
xxx_messageInfo_ReqIssuanceDebtInfoByStatus.DiscardUnknown(m)
func (m *ReqIssuanceRecordsByStatus) XXX_DiscardUnknown() {
xxx_messageInfo_ReqIssuanceRecordsByStatus.DiscardUnknown(m)
}
var xxx_messageInfo_ReqIssuanceDebtInfoByStatus proto.InternalMessageInfo
var xxx_messageInfo_ReqIssuanceRecordsByStatus proto.InternalMessageInfo
func (m *ReqIssuanceDebtInfoByStatus) GetIssuanceId() string {
func (m *ReqIssuanceRecordsByStatus) GetIssuanceId() string {
if m != nil {
return m.IssuanceId
}
return ""
}
func (m *ReqIssuanceDebtInfoByStatus) GetStatus() int32 {
func (m *ReqIssuanceRecordsByStatus) GetStatus() int32 {
if m != nil {
return m.Status
}
return 0
}
// 返回借贷记录
type RepIssuanceDebtInfos struct {
Record []*DebtRecord `protobuf:"bytes,1,rep,name=record,proto3" json:"record,omitempty"`
// 返回记录列表
type RepIssuanceRecords struct {
Records []*DebtRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RepIssuanceRecords) Reset() { *m = RepIssuanceRecords{} }
func (m *RepIssuanceRecords) String() string { return proto.CompactTextString(m) }
func (*RepIssuanceRecords) ProtoMessage() {}
func (*RepIssuanceRecords) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{21}
}
func (m *RepIssuanceRecords) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RepIssuanceRecords.Unmarshal(m, b)
}
func (m *RepIssuanceRecords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RepIssuanceRecords.Marshal(b, m, deterministic)
}
func (m *RepIssuanceRecords) XXX_Merge(src proto.Message) {
xxx_messageInfo_RepIssuanceRecords.Merge(m, src)
}
func (m *RepIssuanceRecords) XXX_Size() int {
return xxx_messageInfo_RepIssuanceRecords.Size(m)
}
func (m *RepIssuanceRecords) XXX_DiscardUnknown() {
xxx_messageInfo_RepIssuanceRecords.DiscardUnknown(m)
}
var xxx_messageInfo_RepIssuanceRecords proto.InternalMessageInfo
func (m *RepIssuanceRecords) GetRecords() []*DebtRecord {
if m != nil {
return m.Records
}
return nil
}
// 精确查找发行记录
type ReqIssuanceDebtInfo struct {
IssuanceId string `protobuf:"bytes,1,opt,name=issuanceId,proto3" json:"issuanceId,omitempty"`
DebtId string `protobuf:"bytes,2,opt,name=debtId,proto3" json:"debtId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RepIssuanceDebtInfos) Reset() { *m = RepIssuanceDebtInfos{} }
func (m *RepIssuanceDebtInfos) String() string { return proto.CompactTextString(m) }
func (*RepIssuanceDebtInfos) ProtoMessage() {}
func (*RepIssuanceDebtInfos) Descriptor() ([]byte, []int) {
func (m *ReqIssuanceDebtInfo) Reset() { *m = ReqIssuanceDebtInfo{} }
func (m *ReqIssuanceDebtInfo) String() string { return proto.CompactTextString(m) }
func (*ReqIssuanceDebtInfo) ProtoMessage() {}
func (*ReqIssuanceDebtInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{22}
}
func (m *RepIssuanceDebtInfos) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RepIssuanceDebtInfos.Unmarshal(m, b)
func (m *ReqIssuanceDebtInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqIssuanceDebtInfo.Unmarshal(m, b)
}
func (m *ReqIssuanceDebtInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqIssuanceDebtInfo.Marshal(b, m, deterministic)
}
func (m *ReqIssuanceDebtInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqIssuanceDebtInfo.Merge(m, src)
}
func (m *ReqIssuanceDebtInfo) XXX_Size() int {
return xxx_messageInfo_ReqIssuanceDebtInfo.Size(m)
}
func (m *ReqIssuanceDebtInfo) XXX_DiscardUnknown() {
xxx_messageInfo_ReqIssuanceDebtInfo.DiscardUnknown(m)
}
var xxx_messageInfo_ReqIssuanceDebtInfo proto.InternalMessageInfo
func (m *ReqIssuanceDebtInfo) GetIssuanceId() string {
if m != nil {
return m.IssuanceId
}
return ""
}
func (m *ReqIssuanceDebtInfo) GetDebtId() string {
if m != nil {
return m.DebtId
}
return ""
}
// 返回记录
type RepIssuanceDebtInfo struct {
Record *DebtRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RepIssuanceDebtInfo) Reset() { *m = RepIssuanceDebtInfo{} }
func (m *RepIssuanceDebtInfo) String() string { return proto.CompactTextString(m) }
func (*RepIssuanceDebtInfo) ProtoMessage() {}
func (*RepIssuanceDebtInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_7110f4228953d675, []int{23}
}
func (m *RepIssuanceDebtInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RepIssuanceDebtInfo.Unmarshal(m, b)
}
func (m *RepIssuanceDebtInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RepIssuanceDebtInfos.Marshal(b, m, deterministic)
func (m *RepIssuanceDebtInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RepIssuanceDebtInfo.Marshal(b, m, deterministic)
}
func (m *RepIssuanceDebtInfos) XXX_Merge(src proto.Message) {
xxx_messageInfo_RepIssuanceDebtInfos.Merge(m, src)
func (m *RepIssuanceDebtInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_RepIssuanceDebtInfo.Merge(m, src)
}
func (m *RepIssuanceDebtInfos) XXX_Size() int {
return xxx_messageInfo_RepIssuanceDebtInfos.Size(m)
func (m *RepIssuanceDebtInfo) XXX_Size() int {
return xxx_messageInfo_RepIssuanceDebtInfo.Size(m)
}
func (m *RepIssuanceDebtInfos) XXX_DiscardUnknown() {
xxx_messageInfo_RepIssuanceDebtInfos.DiscardUnknown(m)
func (m *RepIssuanceDebtInfo) XXX_DiscardUnknown() {
xxx_messageInfo_RepIssuanceDebtInfo.DiscardUnknown(m)
}
var xxx_messageInfo_RepIssuanceDebtInfos proto.InternalMessageInfo
var xxx_messageInfo_RepIssuanceDebtInfo proto.InternalMessageInfo
func (m *RepIssuanceDebtInfos) GetRecord() []*DebtRecord {
func (m *RepIssuanceDebtInfo) GetRecord() *DebtRecord {
if m != nil {
return m.Record
}
......@@ -1411,7 +1523,7 @@ func (m *RepIssuanceDebtInfos) GetRecord() []*DebtRecord {
func init() {
proto.RegisterType((*Issuance)(nil), "types.Issuance")
proto.RegisterType((*DebtRecord)(nil), "types.DebtRecord")
proto.RegisterType((*AssetPriceRecord)(nil), "types.AssetPriceRecord")
proto.RegisterType((*IssuanceAssetPriceRecord)(nil), "types.IssuanceAssetPriceRecord")
proto.RegisterType((*IssuanceAction)(nil), "types.IssuanceAction")
proto.RegisterType((*IssuanceManage)(nil), "types.IssuanceManage")
proto.RegisterType((*IssuanceCreate)(nil), "types.IssuanceCreate")
......@@ -1427,78 +1539,83 @@ func init() {
proto.RegisterType((*ReqIssuanceInfos)(nil), "types.ReqIssuanceInfos")
proto.RegisterType((*RepIssuanceCurrentInfos)(nil), "types.RepIssuanceCurrentInfos")
proto.RegisterType((*ReqIssuanceByStatus)(nil), "types.ReqIssuanceByStatus")
proto.RegisterType((*ReqIssuanceByAddr)(nil), "types.ReqIssuanceByAddr")
proto.RegisterType((*RepIssuanceIDs)(nil), "types.RepIssuanceIDs")
proto.RegisterType((*ReqIssuanceDebtInfoByAddr)(nil), "types.ReqIssuanceDebtInfoByAddr")
proto.RegisterType((*ReqIssuanceDebtInfoByStatus)(nil), "types.ReqIssuanceDebtInfoByStatus")
proto.RegisterType((*RepIssuanceDebtInfos)(nil), "types.RepIssuanceDebtInfos")
proto.RegisterType((*ReqIssuanceRecordsByAddr)(nil), "types.ReqIssuanceRecordsByAddr")
proto.RegisterType((*ReqIssuanceRecordsByStatus)(nil), "types.ReqIssuanceRecordsByStatus")
proto.RegisterType((*RepIssuanceRecords)(nil), "types.RepIssuanceRecords")
proto.RegisterType((*ReqIssuanceDebtInfo)(nil), "types.ReqIssuanceDebtInfo")
proto.RegisterType((*RepIssuanceDebtInfo)(nil), "types.RepIssuanceDebtInfo")
}
func init() { proto.RegisterFile("issuance.proto", fileDescriptor_7110f4228953d675) }
var fileDescriptor_7110f4228953d675 = []byte{
// 996 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x6e, 0xe4, 0x34,
0x14, 0x6e, 0x92, 0xf9, 0x69, 0xcf, 0xb4, 0xd3, 0xae, 0xb7, 0x5b, 0xc2, 0xdf, 0x6a, 0x64, 0x21,
0x31, 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0x73, 0x38,
0x6c, 0xd4, 0x52, 0xa7, 0x95, 0xec, 0x19, 0x8c, 0xf4, 0x35, 0x30, 0x8c, 0xaf, 0xf9, 0x98, 0x34,
0x80, 0x9b, 0x11, 0x7d, 0xa9, 0x9f, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x5c, 0x7b, 0x9a,
0xbb, 0x0b, 0x00, 0x00,
// 1067 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x6e, 0xdb, 0x46,
0x10, 0x36, 0x49, 0x51, 0xb2, 0x47, 0xb6, 0xec, 0x6c, 0x1c, 0x97, 0x08, 0xda, 0x40, 0x58, 0xf4,
0xa0, 0xf4, 0xc7, 0x6e, 0xed, 0xa2, 0x40, 0x6f, 0xb5, 0xec, 0xb6, 0x16, 0xd0, 0x04, 0x01, 0x6b,
0x04, 0xbd, 0xd2, 0xe4, 0x3a, 0x20, 0x40, 0x8b, 0x0c, 0xb9, 0x32, 0xa2, 0x73, 0xfb, 0x0c, 0x3d,
0xf4, 0x5d, 0xfa, 0x6a, 0x45, 0x31, 0xb3, 0x4b, 0x2e, 0x7f, 0xa4, 0x4a, 0xe8, 0xa1, 0x17, 0x43,
0x3b, 0xf3, 0xed, 0xec, 0xcc, 0x7c, 0x1f, 0x67, 0xd7, 0x30, 0x8a, 0x8b, 0x62, 0x11, 0xcc, 0x43,
0x71, 0x9a, 0xe5, 0xa9, 0x4c, 0x99, 0x2b, 0x97, 0x99, 0x28, 0xf8, 0x1f, 0x2e, 0xec, 0xce, 0xb4,
0x87, 0xbd, 0x00, 0x28, 0x51, 0xb3, 0xc8, 0xb3, 0xc6, 0xd6, 0x64, 0xcf, 0xaf, 0x59, 0x18, 0x87,
0x7d, 0x99, 0xca, 0x20, 0x99, 0x06, 0x09, 0x5a, 0x3c, 0x7b, 0x6c, 0x4d, 0x1c, 0xbf, 0x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ff, 0xff, 0x80, 0xd9, 0xe6, 0x0e, 0x05, 0x0d, 0x00, 0x00,
}
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