Skip to content

Commit

Permalink
ssi detail add log
Browse files Browse the repository at this point in the history
  • Loading branch information
bourneAc committed Jun 3, 2019
1 parent 841449d commit 2f97d35
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions zero/light/sli.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package light

import (
"encoding/json"
"github.com/sero-cash/go-czero-import/cpt"
"github.com/sero-cash/go-czero-import/keys"
"github.com/sero-cash/go-sero/common/hexutil"
Expand All @@ -9,6 +10,7 @@ import (
"github.com/sero-cash/go-sero/zero/txs/assets"
"github.com/sero-cash/go-sero/zero/txs/stx"
"github.com/sero-cash/go-sero/zero/utils"
"log"
)

type SLI struct {
Expand Down Expand Up @@ -43,10 +45,15 @@ func (self *SLI) DecOuts(outs []light_types.Out, skr *keys.PKr) (douts []light_t
copy(sk[:], skr[:])
for _, out := range outs {
dout := light_types.DOut{}

data, _ := json.Marshal(out)
log.Printf("DecOuts out : %s", string(data))

if out.State.OS.Out_O != nil {
dout.Asset = out.State.OS.Out_O.Asset.Clone()
dout.Memo = out.State.OS.Out_O.Memo
dout.Nil = cpt.GenNil(&sk, out.State.OS.RootCM)
log.Printf("DecOuts Out_O!= nil")
} else {
key, flag := keys.FetchKey(&sk, &out.State.OS.Out_Z.RPK)
info_desc := cpt.InfoDesc{}
Expand All @@ -67,7 +74,9 @@ func (self *SLI) DecOuts(outs []light_types.Out, skr *keys.PKr) (douts []light_t
)
dout.Memo = info_desc.Memo
dout.Nil = cpt.GenNil(&sk, out.State.OS.RootCM)
log.Printf("DecOuts success")
}
log.Printf("DecOuts Out_O == nil")
}
douts = append(douts, dout)
}
Expand Down

0 comments on commit 2f97d35

Please sign in to comment.