-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
read latest mint with graph timestamp
- Loading branch information
1 parent
967269d
commit f4081cb
Showing
9 changed files
with
53 additions
and
47 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,40 @@ | ||
package common | ||
|
||
import "github.com/MixinNetwork/mixin/crypto" | ||
|
||
type UTXOKeysReader interface { | ||
ReadUTXOKeys(hash crypto.Hash, index int) (*UTXOKeys, error) | ||
} | ||
|
||
type UTXOLockReader interface { | ||
ReadUTXOLock(hash crypto.Hash, index int) (*UTXOWithLock, error) | ||
CheckDepositInput(deposit *DepositData, tx crypto.Hash) error | ||
ReadLastMintDistribution(ts uint64) (*MintDistribution, error) | ||
} | ||
|
||
type UTXOLocker interface { | ||
LockUTXOs(inputs []*Input, tx crypto.Hash, fork bool) error | ||
LockDepositInput(deposit *DepositData, tx crypto.Hash, fork bool) error | ||
LockMintInput(mint *MintData, tx crypto.Hash, fork bool) error | ||
} | ||
|
||
type GhostChecker interface { | ||
CheckGhost(key crypto.Key) (*crypto.Hash, error) | ||
} | ||
|
||
type NodeReader interface { | ||
ReadAllNodes(offset uint64, withState bool) []*Node | ||
ReadTransaction(hash crypto.Hash) (*VersionedTransaction, string, error) | ||
} | ||
|
||
type DomainReader interface { | ||
ReadDomains() []*Domain | ||
} | ||
|
||
type DataStore interface { | ||
UTXOLockReader | ||
UTXOLocker | ||
GhostChecker | ||
NodeReader | ||
DomainReader | ||
} |
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
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
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
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