Merge PR #2405: Unbonding and Redelegations Queue

This commit is contained in:
Sunny Aggarwal
2018-10-08 06:43:47 +02:00
committed by Christopher Goes
parent d661ccb30e
commit cd21427a7b
23 changed files with 376 additions and 546 deletions
+7
View File
@@ -4,6 +4,7 @@ package types
import (
"context"
"sync"
"time"
"github.com/golang/protobuf/proto"
@@ -181,6 +182,12 @@ func (c Context) WithBlockHeader(header abci.Header) Context {
return c.withValue(contextKeyBlockHeader, header)
}
func (c Context) WithBlockTime(newTime time.Time) Context {
newHeader := c.BlockHeader()
newHeader.Time = newTime
return c.WithBlockHeader(newHeader)
}
func (c Context) WithBlockHeight(height int64) Context {
return c.withValue(contextKeyBlockHeight, height)
}