GetVersion return the version of store
()
| 430 | |
| 431 | //GetVersion return the version of store |
| 432 | func (this *BlockStore) GetVersion() (byte, error) { |
| 433 | key := this.getVersionKey() |
| 434 | value, err := this.store.Get(key) |
| 435 | if err != nil { |
| 436 | return 0, err |
| 437 | } |
| 438 | reader := bytes.NewReader(value) |
| 439 | return reader.ReadByte() |
| 440 | } |
| 441 | |
| 442 | //SaveVersion persist version to store |
| 443 | func (this *BlockStore) SaveVersion(ver byte) error { |
nothing calls this directly
no test coverage detected