log "github.com/sirupsen/logrus"
- "github.com/vapor/config"
- "github.com/vapor/crypto/ed25519/chainkd"
- "github.com/vapor/errors"
- "github.com/vapor/event"
- "github.com/vapor/protocol/bc"
- "github.com/vapor/protocol/bc/types"
- "github.com/vapor/protocol/state"
+ "github.com/bytom/vapor/config"
+ "github.com/bytom/vapor/crypto/ed25519/chainkd"
+ "github.com/bytom/vapor/errors"
+ "github.com/bytom/vapor/event"
+ "github.com/bytom/vapor/protocol/bc"
+ "github.com/bytom/vapor/protocol/bc/types"
+ "github.com/bytom/vapor/protocol/state"
)
const (
cachekey := signCacheKey(blockHash.String(), pubKey)
if signature, ok := c.signatureCache.Get(cachekey); ok {
block.Set(node.Order, signature.([]byte))
- c.eventDispatcher.Post(event.BlockSignatureEvent{BlockHash: blockHash, Signature: signature.([]byte), XPub: []byte(pubKey)})
+ c.eventDispatcher.Post(event.BlockSignatureEvent{BlockHash: blockHash, Signature: signature.([]byte), XPub: node.XPub[:]})
c.signatureCache.Remove(cachekey)
} else {
continue
// save the signature if the block is not exist
if blockHeader == nil {
var xPubKey chainkd.XPub
- copy(xPub[:], xPub[:])
+ copy(xPubKey[:], xPub[:])
if !xPubKey.Verify(blockHash.Bytes(), signature) {
return errInvalidSignature
}