forked from TrueCloudLab/neoneo-go
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)
|
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 {
|
func hashAndIndexToBytes(h util.Uint256, index uint32) []byte {
|
||||||
buf := io.NewBufBinWriter()
|
buf := io.NewBufBinWriter()
|
||||||
buf.WriteBytes(h.BytesLE())
|
buf.WriteBytes(h.BytesLE())
|
||||||
|
|
Loading…
Reference in a new issue