Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate signature error Signature count is 2 more than key counts of permission : 1 #140

Open
anikeeva91 opened this issue Sep 28, 2024 · 0 comments

Comments

@anikeeva91
Copy link

When I set the owner permission to two addresses and use both addresses' private keys to double sign, I can broadcast transactions normally

But when I set the active address to two addresses and double sign with both addresses, the error message 'validate signature error Signature count is 2 more than key counts of permission: 1'

I use this code like

rawData, _ := proto.Marshal(tx.GetRawData())
h256h := sha256.New()
h256h.Write(rawData)
hash := h256h.Sum(nil)
signature1, err := crypto.Sign(hash, privateKey1)
signature2, err := crypto.Sign(hash, privateKey2)
signature3, err := crypto.Sign(hash, privateKey3)
tx.Signature = append(tx.Signature, signature1)
tx.Signature = append(tx.Signature, signature2)
tx.Signature = append(tx.Signature, signature3)
result, err := c.Broadcast(tx)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant