Skip to content

Commit 7ebb4da

Browse files
committed
Rem data_slice chain cons in favor of stream::in::fast&& overrides.
1 parent ee9a99e commit 7ebb4da

18 files changed

+2
-61
lines changed

include/bitcoin/system/chain/block.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class BC_API block
5555
block(const chain::header::cptr& header,
5656
const transactions_cptr& txs) NOEXCEPT;
5757

58-
block(const data_slice& data, bool witness) NOEXCEPT;
5958
block(stream::in::fast&& stream, bool witness) NOEXCEPT;
6059
block(stream::in::fast& stream, bool witness) NOEXCEPT;
6160
block(std::istream&& stream, bool witness) NOEXCEPT;

include/bitcoin/system/chain/header.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class BC_API header
6666
const hash_digest& merkle_root, uint32_t timestamp, uint32_t bits,
6767
uint32_t nonce) NOEXCEPT;
6868

69-
header(const data_slice& data) NOEXCEPT;
7069
header(stream::in::fast&& stream) NOEXCEPT;
7170
header(stream::in::fast& stream) NOEXCEPT;
7271
header(std::istream&& stream) NOEXCEPT;

include/bitcoin/system/chain/input.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class BC_API input
6868
input(const chain::point::cptr& point, const chain::script::cptr& script,
6969
const chain::witness::cptr& witness, uint32_t sequence) NOEXCEPT;
7070

71-
input(const data_slice& data) NOEXCEPT;
7271
input(stream::in::fast&& stream) NOEXCEPT;
7372
input(stream::in::fast& stream) NOEXCEPT;
7473
input(std::istream&& stream) NOEXCEPT;

include/bitcoin/system/chain/operation.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ class BC_API operation
8484
operation(const chunk_cptr& push_data, bool minimal) NOEXCEPT;
8585

8686
/// These deserialize operations (with codes), not from push-data.
87-
operation(const data_slice& op_data) NOEXCEPT;
8887
operation(stream::in::fast&& stream) NOEXCEPT;
8988
operation(stream::in::fast& stream) NOEXCEPT;
9089
operation(std::istream&& stream) NOEXCEPT;

include/bitcoin/system/chain/output.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class BC_API output
5050
output(uint64_t value, const chain::script& script) NOEXCEPT;
5151
output(uint64_t value, const chain::script::cptr& script) NOEXCEPT;
5252

53-
output(const data_slice& data) NOEXCEPT;
5453
output(stream::in::fast&& stream) NOEXCEPT;
5554
output(stream::in::fast& stream) NOEXCEPT;
5655
output(std::istream&& stream) NOEXCEPT;

include/bitcoin/system/chain/point.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class BC_API point
5757
point(hash_digest&& hash, uint32_t index) NOEXCEPT;
5858
point(const hash_digest& hash, uint32_t index) NOEXCEPT;
5959

60-
point(const data_slice& data) NOEXCEPT;
6160
point(stream::in::fast&& stream) NOEXCEPT;
6261
point(stream::in::fast& stream) NOEXCEPT;
6362
point(std::istream&& stream) NOEXCEPT;

include/bitcoin/system/chain/script.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class BC_API script
102102
script(const operations& ops) NOEXCEPT;
103103
script(operations&& ops, bool prefail) NOEXCEPT;
104104
script(const operations& ops, bool prefail) NOEXCEPT;
105-
script(const data_slice& data, bool prefix) NOEXCEPT;
105+
106106
script(stream::in::fast&& stream, bool prefix) NOEXCEPT;
107107
script(stream::in::fast& stream, bool prefix) NOEXCEPT;
108108
script(std::istream&& stream, bool prefix) NOEXCEPT;

include/bitcoin/system/chain/transaction.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ class BC_API transaction
6969
const chain::outputs& outputs, uint32_t locktime) NOEXCEPT;
7070
transaction(uint32_t version, const inputs_cptr& inputs,
7171
const outputs_cptr& outputs, uint32_t locktime) NOEXCEPT;
72-
73-
transaction(const data_slice& data, bool witness) NOEXCEPT;
72+
7473
transaction(stream::in::fast&& stream, bool witness) NOEXCEPT;
7574
transaction(stream::in::fast& stream, bool witness) NOEXCEPT;
7675
transaction(std::istream&& stream, bool witness) NOEXCEPT;

include/bitcoin/system/chain/witness.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class BC_API witness
5555
witness(chunk_cptrs&& stack) NOEXCEPT;
5656
witness(const chunk_cptrs& stack) NOEXCEPT;
5757

58-
witness(const data_slice& data, bool prefix) NOEXCEPT;
5958
witness(stream::in::fast&& stream, bool prefix) NOEXCEPT;
6059
witness(stream::in::fast& stream, bool prefix) NOEXCEPT;
6160
witness(std::istream&& stream, bool prefix) NOEXCEPT;

src/chain/block.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ block::block(const chain::header::cptr& header,
7272
{
7373
}
7474

75-
block::block(const data_slice& data, bool witness) NOEXCEPT
76-
: block(stream::in::fast(data), witness)
77-
{
78-
}
79-
8075
block::block(stream::in::fast&& stream, bool witness) NOEXCEPT
8176
: block(read::bytes::fast(stream), witness)
8277
{

src/chain/header.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ header::header(uint32_t version, const hash_digest& previous_block_hash,
5959
{
6060
}
6161

62-
header::header(const data_slice& data) NOEXCEPT
63-
BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
64-
: header(stream::in::copy(data))
65-
BC_POP_WARNING()
66-
{
67-
}
68-
6962
header::header(stream::in::fast&& stream) NOEXCEPT
7063
: header(read::bytes::fast(stream))
7164
{

src/chain/input.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ input::input(const chain::point::cptr& point, const chain::script::cptr& script,
144144
{
145145
}
146146

147-
input::input(const data_slice& data) NOEXCEPT
148-
: input(stream::in::copy(data))
149-
{
150-
}
151-
152147
input::input(stream::in::fast&& stream) NOEXCEPT
153148
: input(read::bytes::fast(stream))
154149
{

src/chain/operation.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ operation::operation(const chunk_cptr& push_data, bool minimal) NOEXCEPT
123123
{
124124
}
125125

126-
operation::operation(const data_slice& op_data) NOEXCEPT
127-
BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
128-
: operation(stream::in::copy(op_data))
129-
BC_POP_WARNING()
130-
{
131-
}
132-
133126
operation::operation(stream::in::fast&& stream) NOEXCEPT
134127
: operation(read::bytes::fast(stream))
135128
{

src/chain/output.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ output::output(uint64_t value, const chain::script::cptr& script) NOEXCEPT
6060
{
6161
}
6262

63-
output::output(const data_slice& data) NOEXCEPT
64-
: output(stream::in::copy(data))
65-
{
66-
}
67-
6863
output::output(stream::in::fast&& stream) NOEXCEPT
6964
: output(read::bytes::fast(stream))
7065
{

src/chain/point.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ point::point(const hash_digest& hash, uint32_t index) NOEXCEPT
5050
{
5151
}
5252

53-
point::point(const data_slice& data) NOEXCEPT
54-
BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
55-
: point(stream::in::copy(data))
56-
BC_POP_WARNING()
57-
{
58-
}
59-
6053
point::point(stream::in::fast&& stream) NOEXCEPT
6154
: point(read::bytes::fast(stream))
6255
{

src/chain/script.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ script::script(const operations& ops, bool prefail) NOEXCEPT
111111
{
112112
}
113113

114-
script::script(const data_slice& data, bool prefix) NOEXCEPT
115-
: script(stream::in::copy(data), prefix)
116-
{
117-
}
118-
119114
script::script(stream::in::fast&& stream, bool prefix) NOEXCEPT
120115
: script(read::bytes::fast(stream), prefix)
121116
{

src/chain/transaction.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ transaction::transaction(uint32_t version, const inputs_cptr& inputs,
9898
{
9999
}
100100

101-
transaction::transaction(const data_slice& data, bool witness) NOEXCEPT
102-
: transaction(stream::in::copy(data), witness)
103-
{
104-
}
105-
106101
transaction::transaction(stream::in::fast&& stream, bool witness) NOEXCEPT
107102
: transaction(read::bytes::fast(stream), witness)
108103
{

src/chain/witness.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ witness::witness(const chunk_cptrs& stack) NOEXCEPT
7272
{
7373
}
7474

75-
witness::witness(const data_slice& data, bool prefix) NOEXCEPT
76-
: witness(stream::in::copy(data), prefix)
77-
{
78-
}
79-
8075
witness::witness(stream::in::fast&& stream, bool prefix) NOEXCEPT
8176
: witness(read::bytes::fast(stream), prefix)
8277
{

0 commit comments

Comments
 (0)