Apply suggestions from code review
Apply suggestions from code review

Co-Authored-By: François Garillot <5187da0b934cc25eb2201a3ec9206c24b13cb23b@garillot.net>
libra/libra,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,libra/libra,aptos-labs/aptos-core,libra/libra,aptos-labs/aptos-core,libra/libra,libra/libra,aptos-labs/aptos-core,aptos-labs/aptos-core