mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
core: add native contracts' hashes getters
This commit is contained in:
parent
6b2f4efdd4
commit
fc3acdc80c
1 changed files with 10 additions and 0 deletions
|
@ -1721,6 +1721,16 @@ func (bc *Blockchain) verifyHeaderWitnesses(currHeader, prevHeader *block.Header
|
|||
return bc.verifyHashAgainstScript(hash, &currHeader.Script, interopCtx, true)
|
||||
}
|
||||
|
||||
// GoverningTokenHash returns the governing token (NEO) native contract hash.
|
||||
func (bc *Blockchain) GoverningTokenHash() util.Uint160 {
|
||||
return bc.contracts.NEO.Hash
|
||||
}
|
||||
|
||||
// UtilityTokenHash returns the utility token (GAS) native contract hash.
|
||||
func (bc *Blockchain) UtilityTokenHash() util.Uint160 {
|
||||
return bc.contracts.GAS.Hash
|
||||
}
|
||||
|
||||
func hashAndIndexToBytes(h util.Uint256, index uint32) []byte {
|
||||
buf := io.NewBufBinWriter()
|
||||
buf.WriteBytes(h.BytesLE())
|
||||
|
|
Loading…
Reference in a new issue