diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/bytes.go | 11 | ||||
-rw-r--r-- | common/bytes_test.go | 14 | ||||
-rw-r--r-- | common/db.go | 1 | ||||
-rw-r--r-- | common/natspec/natspec_e2e_test.go | 3 |
4 files changed, 3 insertions, 26 deletions
diff --git a/common/bytes.go b/common/bytes.go index 5d1245107..d279156b4 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -106,17 +106,6 @@ func ReadVarInt(buff []byte) (ret uint64) { return } -// Binary length -// -// Returns the true binary length of the given number -func BinaryLength(num int) int { - if num == 0 { - return 0 - } - - return 1 + BinaryLength(num>>8) -} - // Copy bytes // // Returns an exact copy of the provided bytes diff --git a/common/bytes_test.go b/common/bytes_test.go index 4b00aa49b..069af984c 100644 --- a/common/bytes_test.go +++ b/common/bytes_test.go @@ -79,20 +79,6 @@ func (s *BytesSuite) TestReadVarInt(c *checker.C) { c.Assert(res1, checker.Equals, exp1) } -func (s *BytesSuite) TestBinaryLength(c *checker.C) { - data1 := 0 - data2 := 920987656789 - - exp1 := 0 - exp2 := 5 - - res1 := BinaryLength(data1) - res2 := BinaryLength(data2) - - c.Assert(res1, checker.Equals, exp1) - c.Assert(res2, checker.Equals, exp2) -} - func (s *BytesSuite) TestCopyBytes(c *checker.C) { data1 := []byte{1, 2, 3, 4} exp1 := []byte{1, 2, 3, 4} diff --git a/common/db.go b/common/db.go index 408b1e755..ae13c7557 100644 --- a/common/db.go +++ b/common/db.go @@ -7,4 +7,5 @@ type Database interface { Delete(key []byte) error LastKnownTD() []byte Close() + Flush() error } diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index 147abe162..e54b9ee96 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -220,7 +220,7 @@ func (self *testFrontend) applyTxs() { block := self.ethereum.ChainManager().NewBlock(cb) coinbase := self.stateDb.GetStateObject(cb) coinbase.SetGasPool(big.NewInt(10000000)) - txs := self.ethereum.TxPool().GetTransactions() + txs := self.ethereum.TxPool().GetQueuedTransactions() for i := 0; i < len(txs); i++ { for _, tx := range txs { @@ -284,6 +284,7 @@ func (self *testFrontend) testResolver() *resolver.Resolver { } func TestNatspecE2E(t *testing.T) { + t.Skip() tf := testInit(t) defer tf.ethereum.Stop() |