ctx with proposer, working through allocation test

This commit is contained in:
rigelrozanski
2018-10-10 17:43:47 -04:00
parent 22de85651f
commit 3b5e57be08
8 changed files with 157 additions and 34 deletions
+6
View File
@@ -188,6 +188,12 @@ func (c Context) WithBlockTime(newTime time.Time) Context {
return c.WithBlockHeader(newHeader)
}
func (c Context) WithProposer(addr ConsAddress) Context {
newHeader := c.BlockHeader()
newHeader.ProposerAddress = addr.Bytes()
return c.WithBlockHeader(newHeader)
}
func (c Context) WithBlockHeight(height int64) Context {
return c.withValue(contextKeyBlockHeight, height)
}