예제 #1
0
 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;
     }
 }
예제 #2
0
        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;
            }
        }
예제 #3
0
 public async Task <BeaconBlock> NewBlockAsync(Slot slot, BlsSignature randaoReveal)
 {
     return(await _blockProducer.NewBlockAsync(slot, randaoReveal));
 }