public async Task <BeaconBlock> NewBlockAsync(Slot slot, BlsSignature randaoReveal, CancellationToken cancellationToken) { try { return(await _blockProducer.NewBlockAsync(slot, randaoReveal).ConfigureAwait(false)); } catch (Exception ex) { if (_logger.IsWarn()) { Log.ApiErrorNewBlock(_logger, ex); } throw; } }
public async Task <ApiResponse <BeaconBlock> > NewBlockAsync(Slot slot, BlsSignature randaoReveal, CancellationToken cancellationToken) { try { BeaconBlock unsignedBlock = await _blockProducer.NewBlockAsync(slot, randaoReveal, cancellationToken) .ConfigureAwait(false); return(ApiResponse.Create(StatusCode.Success, unsignedBlock)); } catch (Exception ex) { if (_logger.IsWarn()) { Log.ApiErrorNewBlock(_logger, ex); } throw; } }
public async Task <BeaconBlock> NewBlockAsync(Slot slot, BlsSignature randaoReveal) { return(await _blockProducer.NewBlockAsync(slot, randaoReveal)); }