diff options
Diffstat (limited to 'core/test/governance.go')
-rw-r--r-- | core/test/governance.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/test/governance.go b/core/test/governance.go index a2e6f69..63462d0 100644 --- a/core/test/governance.go +++ b/core/test/governance.go @@ -65,8 +65,13 @@ func NewGovernance(nodeCount int, lambda time.Duration) ( // GetNotarySet implements Governance interface to return current // notary set. -func (g *Governance) GetNotarySet() map[types.NodeID]struct{} { - return g.notarySet +func (g *Governance) GetNotarySet() (ret map[types.NodeID]struct{}) { + // Return a cloned map. + ret = make(map[types.NodeID]struct{}) + for k := range g.notarySet { + ret[k] = struct{}{} + } + return } // GetConfiguration returns the configuration at a given block height. |