core: move transaction's sender to cosigners

Closes #1184

Ported changes from https://github.com/neo-project/neo/pull/1752
This commit is contained in:
Anna Shaleva 2020-07-29 19:57:38 +03:00
parent 8697582b23
commit 90825efa16
36 changed files with 307 additions and 264 deletions

View file

@ -255,12 +255,12 @@ func (c *WSClient) SubscribeForNewBlocks(primary *int) (string, error) {
}
// SubscribeForNewTransactions adds subscription for new transaction events to
// this instance of client. It can be filtered by sender and/or cosigner, nil
// this instance of client. It can be filtered by sender and/or signer, nil
// value is treated as missing filter.
func (c *WSClient) SubscribeForNewTransactions(sender *util.Uint160, cosigner *util.Uint160) (string, error) {
func (c *WSClient) SubscribeForNewTransactions(sender *util.Uint160, signer *util.Uint160) (string, error) {
params := request.NewRawParams("transaction_added")
if sender != nil || cosigner != nil {
params.Values = append(params.Values, request.TxFilter{Sender: sender, Cosigner: cosigner})
if sender != nil || signer != nil {
params.Values = append(params.Values, request.TxFilter{Sender: sender, Signer: signer})
}
return c.performSubscription(params)
}