Commit 225d3319 authored by pengjun's avatar pengjun

#627 add collateralize unit test

parent fd74b16e
This diff is collapsed.
......@@ -37,12 +37,12 @@ func calcCollateralizePriceKey(time string) []byte {
}
func calcCollateralizeRecordAddrPrefix(addr string) []byte {
key := fmt.Sprintf("LODB-collateralize-record-addr:%d", addr)
key := fmt.Sprintf("LODB-collateralize-record-addr:%s", addr)
return []byte(key)
}
func calcCollateralizeRecordAddrKey(addr string, index int64) []byte {
key := fmt.Sprintf("LODB-collateralize-record-addr:%d:%018d", addr, index)
key := fmt.Sprintf("LODB-collateralize-record-addr:%s:%018d", addr, index)
return []byte(key)
}
......
......@@ -519,12 +519,3 @@ func signTx(tx *types.Transaction, hexPrivKey string) (*types.Transaction, error
tx.Sign(int32(signType), privKey)
return tx, nil
}
//func TestSlice(t *testing.T) {
// var a []int
// a = append(a, 1)
// fmt.Println(a)
//
// a = append(a[:0], a[1:]...)
// fmt.Println(a)
//}
\ No newline at end of file
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