rpc: implement getrawmempool RPC

closes #175
This commit is contained in:
Anna Shaleva 2020-03-02 19:13:44 +03:00
parent 252a9f2f31
commit e1fe12a07f
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"
)
@ -66,3 +68,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
}