ctx with proposer, working through allocation test
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user