GetSysFeeAmount return the sys fee for block by block hash
(blockHash common.Uint256)
| 208 | |
| 209 | //GetSysFeeAmount return the sys fee for block by block hash |
| 210 | func (this *BlockStore) GetSysFeeAmount(blockHash common.Uint256) (common.Fixed64, error) { |
| 211 | key := this.getHeaderKey(blockHash) |
| 212 | data, err := this.store.Get(key) |
| 213 | if err != nil { |
| 214 | return common.Fixed64(0), err |
| 215 | } |
| 216 | source := common.NewZeroCopySource(data) |
| 217 | var fee common.Fixed64 |
| 218 | err = fee.Deserialization(source) |
| 219 | if err != nil { |
| 220 | return common.Fixed64(0), err |
| 221 | } |
| 222 | return fee, nil |
| 223 | } |
| 224 | |
| 225 | func (this *BlockStore) loadHeader(blockHash common.Uint256) (*types.Header, error) { |
| 226 | rawHeader, err := this.loadRawHeader(blockHash) |