Merge pull request #704 from nspcc-dev/feature/getrawmempool

rpc: implement getrawmempool RPC
This commit is contained in:
Roman Khimov 2020-03-02 19:44:19 +03:00 committed by GitHub
commit 3282c6ed41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 1 deletions

View file

@ -9,9 +9,11 @@ import (
"github.com/CityOfZion/neo-go/pkg/core"
"github.com/CityOfZion/neo-go/pkg/core/block"
"github.com/CityOfZion/neo-go/pkg/core/storage"
"github.com/CityOfZion/neo-go/pkg/core/transaction"
"github.com/CityOfZion/neo-go/pkg/io"
"github.com/CityOfZion/neo-go/pkg/network"
"github.com/CityOfZion/neo-go/pkg/rpc/request"
"github.com/CityOfZion/neo-go/pkg/util"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
)
@ -67,3 +69,21 @@ func initServerWithInMemoryChain(t *testing.T) (*core.Blockchain, http.HandlerFu
return chain, handler
}
type FeerStub struct{}
func (fs *FeerStub) NetworkFee(*transaction.Transaction) util.Fixed8 {
return 0
}
func (fs *FeerStub) IsLowPriority(util.Fixed8) bool {
return false
}
func (fs *FeerStub) FeePerByte(*transaction.Transaction) util.Fixed8 {
return 0
}
func (fs *FeerStub) SystemFee(*transaction.Transaction) util.Fixed8 {
return 0
}