-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gordon-sero
committed
May 6, 2019
1 parent
15a4fac
commit 5e226ec
Showing
4 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package light_issi | ||
|
||
import ( | ||
"github.com/sero-cash/go-czero-import/keys" | ||
"github.com/sero-cash/go-sero/common/hexutil" | ||
"github.com/sero-cash/go-sero/zero/light/light_types" | ||
) | ||
|
||
type Out struct { | ||
Root keys.Uint256 | ||
PKr keys.PKr | ||
} | ||
type Block struct { | ||
Num hexutil.Uint64 | ||
Outs []Out | ||
Nils []keys.Uint256 | ||
} | ||
|
||
type GIn struct { | ||
SKr keys.PKr | ||
Root keys.Uint256 | ||
} | ||
|
||
type GenTxParam struct { | ||
Gas uint64 | ||
GasPrice uint64 | ||
From light_types.Kr | ||
Ins []GIn | ||
Outs []light_types.GOut | ||
} | ||
|
||
type ISSI interface { | ||
GetBlocksInfo(start uint64, count uint64) ([]Block, error) | ||
Detail(root []keys.Uint256, skr *keys.PKr) ([]light_types.DOut, error) | ||
GenTx(param GenTxParam) (keys.Uint256, error) | ||
CommitTx(txhash keys.Uint256) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package light | ||
|
||
import ( | ||
"github.com/sero-cash/go-czero-import/keys" | ||
"github.com/sero-cash/go-sero/zero/light/light_issi" | ||
"github.com/sero-cash/go-sero/zero/light/light_types" | ||
) | ||
|
||
type SSI struct { | ||
} | ||
|
||
var SSI_Inst = SSI{} | ||
|
||
func (self *SSI) GetBlocksInfo(start uint64, count uint64) (blocks []light_issi.Block, e error) { | ||
|
||
return | ||
} | ||
|
||
func (self *SSI) Detail(root []keys.Uint256, skr *keys.PKr) (douts []light_types.DOut, e error) { | ||
|
||
return | ||
} | ||
|
||
func (self *SSI) GenTx(param light_issi.GenTxParam) (hash keys.Uint256, e error) { | ||
|
||
return | ||
} | ||
|
||
func (self *SSI) CommitTx(txhash keys.Uint256) (e error) { | ||
|
||
return | ||
} |