neo-go/pkg/consensus/crypto.go
Roman Khimov ee0d92c6d2 dbft: update to AMEV-enabled version
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-08-01 22:29:51 +03:00

19 lines
450 B
Go

package consensus
import (
"github.com/nspcc-dev/dbft"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
)
// privateKey is a wrapper around keys.PrivateKey
// which implements the crypto.PrivateKey interface.
type privateKey struct {
*keys.PrivateKey
}
var _ dbft.PrivateKey = &privateKey{}
// Sign implements the dbft's crypto.PrivateKey interface.
func (p *privateKey) Sign(data []byte) ([]byte, error) {
return p.PrivateKey.Sign(data), nil
}