change sm->new_block() to return an optional
This commit is contained in:
@@ -85,14 +85,21 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
virtual block_address new_block() {
|
||||
// new_block can recurse, because we know it's
|
||||
// looking up entries in the _previous_
|
||||
// transaction.
|
||||
// new_block must not recurse.
|
||||
virtual boost::optional<block_address>
|
||||
new_block() {
|
||||
cant_recurse("new_block");
|
||||
recursing_lock lock(*this);
|
||||
return sm_->new_block();
|
||||
}
|
||||
|
||||
virtual boost::optional<block_address>
|
||||
new_block(block_address begin, block_address end) {
|
||||
cant_recurse("new_block(range)");
|
||||
recursing_lock lock(*this);
|
||||
return sm_->new_block(begin, end);
|
||||
}
|
||||
|
||||
virtual bool count_possibly_greater_than_one(block_address b) const {
|
||||
if (depth_)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user