mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-18 06:44:17 -05:00
d1e2aa01f3
ref.Ref -> hash.Hash
19 lines
335 B
Go
19 lines
335 B
Go
package chunks
|
|
|
|
import "github.com/attic-labs/noms/hash"
|
|
|
|
type memoryRootTracker hash.Hash
|
|
|
|
func (ms *memoryRootTracker) Root() hash.Hash {
|
|
return hash.Hash(*ms)
|
|
}
|
|
|
|
func (ms *memoryRootTracker) UpdateRoot(current, last hash.Hash) bool {
|
|
if last != hash.Hash(*ms) {
|
|
return false
|
|
}
|
|
|
|
*ms = memoryRootTracker(current)
|
|
return true
|
|
}
|