OpenAtomFoundation / xupercore

The kernel of xuperchain.
Apache License 2.0
61 stars 47 forks source link

Add timestamp of block #226

Closed ff629 closed 3 years ago

ff629 commented 3 years ago

Description

Can‘t get timestamp of block from contract-sdk.

Type of change

Brief of your solution

Change contract.proto and then execute compile_proto.sh in bridge to change contract.pb.go Change syscall_service.go to add timestamp to the block which is the return value of function QueryBlock

How Has This Been Tested?

I changed the go.mod of xuperchain to use the new xupercore. Then i create a new chain and use it normally.

codecov-commenter commented 3 years ago

Codecov Report

Merging #226 (3ee7b88) into master (9042b75) will decrease coverage by 0.06%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
- Coverage   47.39%   47.33%   -0.07%     
==========================================
  Files         133      133              
  Lines       11413    11413              
==========================================
- Hits         5409     5402       -7     
- Misses       4869     4877       +8     
+ Partials     1135     1134       -1     
Impacted Files Coverage Δ
bcs/consensus/tdpos/common.go 64.06% <0.00%> (-3.13%) :arrow_down:
bcs/consensus/xpoa/xpoa.go 55.06% <0.00%> (-1.77%) :arrow_down:
bcs/consensus/tdpos/tdpos.go 40.16% <0.00%> (-1.61%) :arrow_down:
kernel/consensus/base/driver/chained-bft/smr.go 50.46% <0.00%> (+0.92%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9042b75...3ee7b88. Read the comment docs.