-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[block] deprecate some code in block.go and body.go #3453
Conversation
require.NoError(t, err) | ||
require.Equal(t, blk, newblk) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test is same as TestBlockDeserializer
in above
"github.com/iotexproject/iotex-core/test/identityset" | ||
) | ||
|
||
func TestPutBlockToParentChain(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test is no longer valid after subchain feature/code was removed
}, | ||
}, | ||
} | ||
require.NoError(t, blk.ConvertFromBlockPb(blkpb, 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here only tests block conversion from protobuf, which exist in test code under /blockchain/block/
Codecov Report
@@ Coverage Diff @@
## master #3453 +/- ##
=======================================
Coverage 75.20% 75.20%
=======================================
Files 236 236
Lines 22006 21991 -15
=======================================
- Hits 16549 16538 -11
+ Misses 4572 4568 -4
Partials 885 885
Continue to review full report at Codecov.
|
return nil, errors.Wrap(err, "failed to deserialize block header") | ||
} | ||
if err := b.Body.LoadProto(pbBlock.GetBody(), bd.evmNetworkID); err != nil { | ||
if b.Body, err = bd.fromBodyProto(pbBlock.GetBody()); err != nil { | ||
return nil, errors.Wrap(err, "failed to deserialize block body") | ||
} | ||
if err := b.ConvertFromBlockFooterPb(pbBlock.GetFooter()); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err = xxx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -77,5 +86,6 @@ func (bd *Deserializer) DeserializeBody(buf []byte) (*Body, error) { | |||
if err := proto.Unmarshal(buf, &pb); err != nil { | |||
return nil, errors.Wrap(err, "failed to unmarshal block body") | |||
} | |||
return bd.FromBodyProto(&pb) | |||
b, err := bd.fromBodyProto(&pb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b, err := balabala
if err != nil {
return nil, err
}
return &b, nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
…re into task/build-node-command * 'task/build-node-command' of github.com:pocockn/iotex-core: [block] deprecate some code in block.go and body.go (iotexproject#3453) [httputil] return error from keep alive methods within httputil pkg (iotexproject#3439)
Description
as title
Fixes #(issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: